You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromsplinterimportBrowserjenkins_url='some value here'browser=Browser('zope.testbrowser')
browser.visit(jenkins_url)
getting back:
Traceback (most recent call last):
File "jenkins_test.py", line 9, in <module>
browser.visit(jenkins_url)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/splinter/driver/zopetestbrowser.py", line 81, in visit
self._browser.open(url)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/zope/testbrowser/browser.py", line 252, in open
self._processRequest(url, make_request)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/zope/testbrowser/browser.py", line 276, in _processRequest
resp = make_request(reqargs)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/zope/testbrowser/browser.py", line 250, in make_request
return self.testapp.get(url, **args)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/webtest/app.py", line 335, in get
expect_errors=expect_errors)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/zope/testbrowser/browser.py", line 92, in do_request
self._assertAllowed(req.url)
File "/Users/homedir/Documents/Jenkins_Test/venv/lib/python2.7/site-packages/zope/testbrowser/browser.py", line 89, in _assertAllowed
raise RobotExclusionError(url, 403, msg, [], None)
zope.testbrowser.browser.RobotExclusionError: HTTP Error 403: request disallowed by robots.txt
Now can visit any URL without request disallowed error.
But frankly zope.testbrowser cannot handle lots of site well, visit probably still failed for other reason. Personally speaking, firefox or chrome is better choice.
Running in python venv (MacOS)
Python 2.7.16
Installed packages in venv:
getting back:
What am I doing wrong ?
Tried to follow this docs here https://splinter.readthedocs.io/en/latest/drivers/zope.testbrowser.html
but
ignore_robots=True
doesn't help:The text was updated successfully, but these errors were encountered: