【发布时间】:2020-08-07 14:14:03
【问题描述】:
我正在尝试使用 selenium 连接到我的 Firefox 浏览器。
#Initialise Firefox
print("here")
locationofDriver = "C:/Users/barry/OneDrive/Documents/Webdriver/"
print("here2")
driver = webdriver.Firefox(locationofDriver)
print("here3")
但我得到两个错误:
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
还有:
urllib3.exceptions.ProtocolError: ('Connection aborted.', TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond', None, 10060, None))
打印语句的输出:
here
here2
我手动启动了 Firefox 以查看它们是否存在问题,但它功能完善 网络驱动程序位于正确的位置。
任何帮助表示赞赏。
【问题讨论】:
标签: python selenium selenium-webdriver selenium-chromedriver geckodriver