小编Gab*_*sos的帖子

selenium.common.exceptions.SessionNotCreatedException:消息:会话未创建:此版本的 ChromeDriver 仅支持 Chrome 版本 114

我收到以下错误:

selenium.common.exceptions.SessionNotCreatedException:消息:会话未创建:此版本的 ChromeDriver 仅支持 Chrome 版本 114 当前浏览器版本为 116.0.5845.97,二进制路径为 C:\Program Files\Google\Chrome\Application\chrome.exe

谁能帮我?我在其他帖子中看到了一些建议,但在这里不起作用。我知道 Selenium v​​4.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)
Run Code Online (Sandbox Code Playgroud)

python selenium-webdriver

2
推荐指数
1
解决办法
1971
查看次数

标签 统计

python ×1

selenium-webdriver ×1