python - Python Webdriver-Manager 在 MXLinux 上显示未知问题
问题描述
目前我使用的是 Webdriver,但它不想使用 Chromedriver。见留言:
[WDM] - ====== WebDriver manager ======
[WDM] - Current chromium version is 90.0.4430
[WDM] - Get LATEST driver version for 90.0.4430
[WDM] - There is no [linux64] chromedriver for browser 90.0.4430 in cache
[WDM] - Get LATEST driver version for 90.0.4430
[WDM] - Trying to download new driver from https://chromedriver.storage.googleapis.com/90.0.4430.24/chromedriver_linux64.zip
[WDM] - Driver has been saved in cache [/home/Linuxuser/.wdm/drivers/chromedriver/linux64/90.0.4430.24]
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 95.0.4638.69 with binary path /usr/bin/google-chrome
Stacktrace:
#0 0x55a82c683e89 <unknown>
要调用它,我使用以下代码:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.utils import ChromeType
driver =webdriver.Chrome(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install())
解决方案
推荐阅读
- php - 即使关闭选项卡,会话变量也会被分配吗?
- java - java中使用栈的排序算法
- angular - angular 5中如何使用父组件的css到子组件
- javascript - javascript - better search value script in nested arrays
- rest - 使用 REST Post 功能将证书导入 IBM-Cloud 上的证书管理器(测试版)
- shell - 在 CMake 中配置运行脚本
- c++ - 程序在没有来自操作系统的信号的情况下挂在函数中的特定行
- java - 在关闭应用程序 javafx 时什么也不做
- javascript - expect.toBeDefined() 不是带有 expect.toMatchObject() 的函数
- mysql - 求和查询花费太多时间