我在Ubuntu中设置了selenium,并为Python编写了自己的框架。 每当我使用框架运行任何测试用例时,我都会遇到以下错误。 但是,如果不使用我的框架,我可以成功运行相同的selenium案例。
我尝试过的东西,但是工作: 重新安装了硒,但它有助于帮助。 重启虚拟机(无论如何我都可以连接到网络)
有人可以就此错误向我提出建议吗?
ERROR: setUpClass (__main__.AuraAccountCreation)
----------------------------------------------------------------------
Traceback (most recent call last):
File "../../../tiselenium/core/testcase.py", line 100, in setUpClass
self.driver = browser_mapping[driver](**args)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.37.2-py2.7.egg/selenium /webdriver/remote/webdriver.py", line 71, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.37.2-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 113, in start_session
'desiredCapabilities': desired_capabilities,
File "/usr/local/lib/python2.7/dist-packages/selenium-2.37.2-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 162, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.37.2-py2.7.egg/selenium/webdriver/remote/remote_connection.py", line 355, in execute
return self._request(url, method=command_info[0], data=data)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.37.2-py2.7.egg/selenium/webdriver/remote/remote_connection.py", line 402, in _request
response = opener.open(request)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>