Selenium::WebDriver::Error::SessionNotCreatedError:来自 github 中的操作(在 vscod 中效果很好)

发布于 2025-01-13 02:14:44 字数 392 浏览 2 评论 0原文

2022-03-08 11:21:22 警告 Selenium [弃用] [:driver_path] Selenium::WebDriver::Chrome#driver_path= 已弃用。请改用 Selenium::WebDriver::Chrome::Service#driver_path= 。

加载spec_helper 时发生错误。 失败/错误:浏览器= Capybara.current_session.driver.browser

Selenium::WebDriver::Error::SessionNotCreatedError: 会话未创建:此版本的 ChromeDriver 仅支持 Chrome 版本 99 当前浏览器版本为 98.0.4758.102,二进制路径为 /usr/bin/google-chrome

2022-03-08 11:21:22 WARN Selenium [DEPRECATION] [:driver_path] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.

An error occurred while loading spec_helper.
Failure/Error: browser = Capybara.current_session.driver.browser

Selenium::WebDriver::Error::SessionNotCreatedError:
session not created: This version of ChromeDriver only supports Chrome version 99
Current browser version is 98.0.4758.102 with binary path /usr/bin/google-chrome

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

手心的海 2025-01-20 02:14:44

该错误消息准确地解释了您的问题是什么 - 您正在将 chromedriver v99.x 与 Chrome v98.x 一起使用 - 这是行不通的。无需尝试手动管理正在使用的 chromedriver 版本,只需使用 webdrivers gem 来自动管理它。

The error message explains exactly what your issue is - You're using chromedriver v99.x with Chrome v98.x -- that won't work. Rather than trying to manually manage the version of chromedriver being used, just use the webdrivers gem to automatically manage it for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文