繁体   English   中英

WebDriverException:消息:“无法连接到ChromeDriver”

[英]WebDriverException: Message: 'Can not connect to the ChromeDriver'

尝试使用硒和Chrome进行测试我遇到了以下错误:

$ python3.4 /var/lib/jenkins/scripts/testlink/pacote_deslogado.py
while not utils.is_connectable(self.port): /usr/local/lib/python3.4/site-packages/selenium/webdriver/chrome/service.py:70: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('127.0.0.1', 54866)>

======================================================================
ERROR: test_a_h_nacional_deslogado (__main__.AHNacionalDeslogado)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/lib/jenkins/scripts/testlink/pacote_deslogado.py", line 25, in setUp
self.driver = webdriver.Chrome(executable_path='/usr/bin/chromedriver')
File "/usr/local/lib/python3.4/site-packages/selenium/webdriver/chrome/webdriver.py", line 59, in __init__
self.service.start()
File "/usr/local/lib/python3.4/site-packages/selenium/webdriver/chrome/service.py", line 74, in start
raise WebDriverException("Can not connect to the ChromeDriver")
selenium.common.exceptions.WebDriverException: Message: Can not connect to the ChromeDriver

我的PATH中有Chromedrive,并且它是可执行文件,我安装了Chromium-Browser。

我不知道还能做什么。

phantomjs同样的错误。 我通过编辑phantojs的路径解决了这个问题; 之前的路径不标准:)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM