首页 > 解决方案 > 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())

标签: pythonpython-3.xunit-testing

解决方案


推荐阅读