我在执行Selenium Java测试时遇到以下错误:
July 11, 2023 6:53:35 PM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 114.0.5735.199 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
字符串
我用了其他的chrome驱动程序,它不工作,有人能帮忙吗?
2条答案
按热度按时间8dtrkrch1#
答案似乎已经在日志中了。
字符串
下载支持Chrome浏览器版本114的最新chromedriver
af7jpaap2#
更新Selenium版本至 4.6 以上。Selenium Manager将自动负责下载ChromeDriver的匹配版本以执行测试。
所以你的最小代码块将是:
字符串