webdriver版本与Google Chrome版本相对应,但是运行还是报错
selenium吧
全部回复
仅看楼主
level 1
qiu09sunny 楼主
已安装python3.7+selenium,webdriver版本下载与Google Chrome匹配的webdriver,放到目录python下,但是运行时报错
Google Chrome浏览器版本是74.0.3729.169,webdriver是下图的chromedriver_win32.zip,解压后放到python目录下
2019年05月23日 13点05分 1
level 1
我也是,估计还是版本不对应,74.0.3729.169和下载的74.0.3729.6后面不同。我打算将浏览器卸载重新换个有匹配webdriver低版本的。
2019年05月28日 10点05分 2
level 1
C:\Users\Administrator\PycharmProjects\untitled\venv\Scripts\python.exe C:/Users/Administrator/PycharmProjects/untitled/1.py
Traceback (most recent call last):
File "C:/Users/Administrator/PycharmProjects/untitled/1.py", line 2, in <module>
driver = webdriver.Chrome()
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Process finished with exit code 1
2019年06月13日 01点06分 4
level 1
你可以试试driver=webdriver()chrome
2019年10月23日 07点10分 5
level 1
楼主解决问题了吗?我也遇上这个,在browser=websriver.chrome('浏览器地址')可以打开浏览器,但是打不开网址。
2020年04月29日 14点04分 6
把cherome放在sele安装目录下
2020年07月25日 04点07分
level 3
看上去你code叫的driver是2。20, 你看看你project里面有没有旧的driver。 或者你可以在设置driver之前先set systemproperty,把chromdriver
正确的
path setup好
2020年08月09日 06点08分 7
level 1
环境变量要设置好
2020年10月25日 09点10分 8
1