Jecke
Jecke

Reputation: 259

Selenium - socket.error: [Errno 111] Connection refused

I'm trying to create Selenium tests for my web application. So far I have:

from selenium import webdriver
import httplib

driver = webdriver.Chrome('v1/chromedriver-Linux64')
#in tutorial, it was just webdriver.Chrome() but that didn't work

url = "http://127.0.0.1:8000/loty/accounts/login/"
try: 
    driver.get(url)
except httplib.BadStatusLine as bsl:
    pass
#in tutorial, it was just driver.get(url) but that didn't work

driver.find_element_by_css_selector("#menu")

Unfortunately, I get a long traceback ending with socket.error: [Errno 111] Connection refused. How can I get it to work?

Upvotes: 2

Views: 2141

Answers (1)

Prany
Prany

Reputation: 2133

You've chrome driver which doesn't support your version of chrome browser. v65-67 is supported by chromedriver 2.38. so it seems a config issue. Use below to install latest version of chrome driver.

http://chromedriver.chromium.org/downloads

Upvotes: 4

Related Questions