利用python3+selenium3+chrome 59.0.3053.3做自动化测试时,打开chrome报错 20
一下是详细信息Traceback(mostrecentcalllast):File"D:/JOY/Project/selenium_test/testSB_TDk.py"...
一下是详细信息Traceback (most recent call last): File "D:/JOY/Project/selenium_test/testSB_TDk.py", line 10, in setUp self.driver.maximize_window() File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 553, in maximize_window self.execute(command, {"windowHandle": "current"}) File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute response = self.command_executor.execute(driver_command, params) File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 415, in execute return self._request(command_info[0], url, body=data) File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 447, in _request resp = self._conn.getresponse() File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1331, in getresponse response.begin() File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 297, in begin version, status, reason = self._read_status() File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "D:\Users\luoqiao\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in readinto return self._sock.recv_into(b)ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
展开
展开全部
#可以试试这段代码能不能用,我这边和你配置一样,是可以开的
from selenium import webdriver
bb = webdriver.Chrome()
bb.get('https://www.baidu.com/')
bb.implicitly_wait(10)
print(bb.title)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询