我在 Windows 7、selenium、chromedriver 版本 84(最新)上使用 python 3 来自动化我的 chrome 浏览器。
我正在使用这个脚本:
from selenium import webdriver
#import chromedriver_binary # Adds chromedriver binary to path
driver = webdriver.Chrome()
driver.get("http://www.python.org")
我总是在运行它时收到此错误。
Traceback (most recent call last):
File "D:\Huzefa\Desktop\zzzzzz.py", line 4, in <module>
driver = webdriver.Chrome()
File "C:\Users\Huzefa\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Huzefa\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Huzefa\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Huzefa\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Huzefa\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 84
我的 ChromeDriver 在路径中。我也使用过其他版本的 chromedriver,但我无法导航到网站!
蓝山帝景
凤凰求蛊
陪伴而非守候
HUWWW
相关分类