我使用pycharm,并安装了chrome驱动程序和selenium(添加了驱动程序和所有内容的路径)。
我尝试重新安装,但无法正常工作。
我运行了打开chrome的基本代码
from selenium import webdriver
driver=webdriver.chrome()
driver.get("https://google.com")
崩溃后会带来此错误
File "F:\python\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in __init__
RemoteWebDriver.__init__(
File "F:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "F:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "F:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "F:\python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
我看了每个教程,但没有修复。
答案 0 :(得分:0)
在我看来,这似乎是ChromeDriver与您使用的Chrome浏览器版本不兼容的问题。
本文介绍了哪个版本的ChromeDriver和Chrome浏览器一起使用:Which ChromeDriver version is compatible with which Chrome Browser version?
此链接是您可以下载旧版ChromeDriver的地方:https://chromedriver.storage.googleapis.com/index.html