我最近将我的谷歌Chrome浏览器更新到了115.0.5790.99版,我正在使用Python WebdriverManager库(3.8.6版)来管理Chrome驱动程序.

然而,自从这次更新以来,当我调用ChromeDriverManager().install()函数时,我遇到了以下错误:

There is no such driver by URL https://chromedriver.storage.googleapis.com/LATEST_RELEASE_115.0.5790

重现该问题的步骤:

  • 将Google Chrome更新到版本115.0.5790.99.

执行以下Python代码:

from webdriver_manager.chrome import ChromeDriverManager

driver_path = ChromeDriverManager().install()

捕获:

exception catched

推荐答案

Selenie管理器

With the availability of Selenium v4.6 and above you don't need to explicitly download ChromeDriver, GeckoDriver or any browser drivers as such using webdriver_manager. You just need to ensure that the desired browser client i.e. , or is installed.

Selenie管理器 is the new tool integrated with that would help to get a working environment to run Selenium out of the box. Beta 1 of Selenie管理器 will configure the browser drivers for Chrome, Firefox, and Edge if they are not present on the PATH.


作为解决方案,您可以简单地执行以下操作:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("start-maximized")
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");

Python-3.x相关问答推荐

如何在Python Matplotlib中在x轴上放置点

类型注释:pathlib. Path vs importlib. resources. abc. Traversable

使用递归将int转换为字符串

在循环中使用Print&S结束参数时出现奇怪的问题

Pandas 插入的速度太慢了.对于跟踪代码,什么是更快的替代方案?

将列表转换为 pandas 数据框,其中列表包含字典

将两列的乘积连续添加到一列的累积和中

以特定方式重新排列 pandas 数据框的列

Python - 根据条件附加 NULL 值

替换 .txt 文件中的项目列表

如何根据索引子列表对元素列表进行分组或批处理?

将值从函数传递到标签

如何在 20 秒后重复使用 Pillow 在现有图像上创建新图像?

双轴上的刻度和标签

列出相同索引的Pandas

Snakemake 'run' 指令不产生错误信息

删除括号和大括号中不必要的空格

Python3 AttributeError:列表对象没有属性清除

ImportError:没有名为资源的模块

Python3 mysqlclient-1.3.6(又名 PyMySQL)的用法?