Selenium - socket.error:[Errno 111]连接被拒绝

时间:2018-05-28 15:01:42

标签: python django selenium

我正在尝试为我的网络应用程序创建Selenium测试。到目前为止,我有:

errorCode

不幸的是,我的long traceback结尾为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") 。我怎样才能让它发挥作用?

1 个答案:

答案 0 :(得分:1)

您的Chrome驱动程序不支持您的Chrome浏览器版本。 chromedriver 2.38支持v65-67。所以它似乎是一个配置问题。使用以下命令安装最新版本的chrome驱动程序。

http://chromedriver.chromium.org/downloads