Skip to content Skip to sidebar Skip to footer

WebDriverException: Message: 'Can Not Connect To The ChromeDriver'. Error In Utils.is_connectable(self.port):

I am trying to use the chromedriver 2.10 to run my tests on Chrome Browser Version 35.0.1916.114 On CentOS machine /home/varunm/EC_WTF_0.4.10/EC_WTF0.4.10_Project/wtframework/wtf/d

Solution 1:


For Linux

1. Check you have installed latest version of chrome brwoser-> "chromium-browser -version"
2. If not, install latest version of chrome "sudo apt-get install chromium-browser"
3. get appropriate version of chrome driver from following link http://chromedriver.storage.googleapis.com/index.html
4. Unzip the chromedriver.zip
5. Move the file to /usr/bin/ directory sudo mv chromedriver /usr/bin/
6. Goto /usr/bin/ directory and you would need to run something like "chmod a+x chromedriver" to mark it executable.
7. finally you can execute the code.

import os
from selenium import webdriver
from pyvirtualdisplay import Display
display = Display(visible=0, size=(800, 600))
display.start()
driver = webdriver.Chrome()
driver.get("http://www.google.com")
print driver.page_source.encode('utf-8')
driver.quit()
display.stop()

Solution 2:

Verify the line 127.0.0.1 localhost is added to your /etc/hosts file and uncommented. This was the issue for some of my colleagues, and I was able to reproduce it after I've removed this line. Adding it back solved the problem.


Solution 3:

open /etc/hosts file and check 127.0.0.1 localhost have matched


Solution 4:

Confirm that your chrome version matches.
If you are using Chrome version 73, please download ChromeDriver 73.0.3683.20
If you are using Chrome version 72, please download ChromeDriver 2.46 or ChromeDriver 72.0.3626.69
If you are using Chrome version 71, please download ChromeDriver 2.46 or ChromeDriver 71.0.3578.137

Download: http://chromedriver.chromium.org/downloads


Solution 5:

This usually means that you are not using the latest ChromeDriver. For that, navigate to https://sites.google.com/a/chromium.org/chromedriver/.


Post a Comment for "WebDriverException: Message: 'Can Not Connect To The ChromeDriver'. Error In Utils.is_connectable(self.port):"