selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
我遇到了以下错误:
selenium.common.exceptions.SessionNotCreatedException: 错误信息:未创建会话:此版本的ChromeDriver仅支持Chrome版本114
当前浏览器版本为116.0.5845.97,二进制路径为C:\Program Files\Google\Chrome\Application\chrome.exe
有人可以帮助我吗?我在其他帖子中看到了一些建议,但在这里都没有生效。我知道Selenium v4.6的更新。我的代码:
from selenium import webdriver import time from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By class ChromeAuto: def __init__(self): self.options = webdriver.ChromeOptions() self.options.add_experimental_option('excludeSwitches', ['enable-logging']) self.service = Service() self.chrome = webdriver.Chrome(service=self.service, options=self.options) self.chrome.implicitly_wait(20)