Docker容器中的Selenium WebDriverException:消息:连接被拒绝

时间:2016-10-28 22:39:57

标签: python selenium firefox selenium-webdriver docker

我正在用selenium + python + firefox进行POC,很快我就要用chrome测试它了。

请参阅我的github:https://github.com/jauyzed/selenium-firefox-python

仅供参考:我没有提交所有必需的文件

当我运行容器时,我看到以下错误:

Traceback (most recent call last):
  File "/root/selenium_wd_tests/google_test_ff.py", line 10, in setUp
  self.driver = webdriver.Firefox()
  File "/usr/local/lib/python2.7/distpackages/selenium/webdriver/firefox/webdriver.py", line 145, in __init__
keep_alive=True)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 92, in __init__
 self.start_session(desired_capabilities, browser_profile)
 File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 179, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
 File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
 File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: connection refused

在这里找到了一些OP但没有人有答案。

有人想过吗?

0 个答案:

没有答案