简体   繁体   中英

WebDriverException: Message: 'Can not connect to the ChromeDriver'

Trying to use run a test with selenium and Chrome I've got this error:

$ 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

I have Chromedrive avaliable in my PATH and it is executable, I installed Chromium-Browser.

I don't know what else I can do.

the same error with phantomjs. I solved it by edit the path of phantojs; the path is nonstandard before :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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