[英]Session not created exception: Chrome version must be >= x.y.z when using Selenium Webdriver with Chrome
A few notes that make this tricky are that I'm using c9.io
(developing in the cloud) so I use the gem webdrivers
to be able to run Chrome with Watir , instead of creating an executable path to the Chrome installed on my device. 让我觉得这很棘手的一些注意事项是我正在使用
c9.io
(在云端开发),所以我使用gem webdrivers
来运行带有Watir的 Chrome ,而不是创建一个安装在我的设备上的Chrome的可执行路径。
My code was working until I logged in today and got the error 我的代码一直工作,直到我今天登录并收到错误
session not created exception: Chrome version must be >= 64.0.3282.0 (Driver info: chromedriver=2.37.543610 (afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform=Linux 4.9.80-c9 x86_64)
会话未创建异常:Chrome版本必须> = 64.0.3282.0(驱动程序信息:chromedriver = 2.37.543610(afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform = Linux 4.9.80-c9 x86_64)
Relevant parts of gemfile (everything else is stock) gemfile的相关部分(其他一切都是库存)
gem 'webdrivers'
gem 'watir'
Code I'm trying to compile 代码我正在尝试编译
def mastersave
require 'watir'
@browser = Watir::Browser.new :chrome, headless: true
end
I'm not stuck on the idea of using Chrome, but it's what was working for me. 我并不是坚持使用Chrome的想法,但这对我有用。 The gem 'webdrivers' also allows me to use firefox, but I get the error 'permission denied' with that.
gem'webdrivers'也允许我使用firefox,但是我得到错误''permission denied'。
For those that have just had this problem going from Chrome 73 to 74 it might be because you are using chromedriver-helper
. 对于刚从Chrome 73到74的问题,可能是因为你正在使用
chromedriver-helper
。 Apparently the chromedriver-helper
gem was deprecated. 显然,
chromedriver-helper
gem已被弃用。 I switched to using the webdrivers
gem and it fixed the issue. 我转而使用
webdrivers
gem并解决了这个问题。
In Gemfile replace: gem 'chromedriver-helper'
在Gemfile中替换:
gem 'chromedriver-helper'
With: gem 'webdrivers', '~> 3.0'
使用:
gem 'webdrivers', '~> 3.0'
bundle install
This error message… 此错误消息...
session not created exception: Chrome version must be >= 64.0.3282.0 (Driver info: chromedriver=2.37.543610 (afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform=Linux 4.9.80-c9 x86_64)
会话未创建异常:Chrome版本必须> = 64.0.3282.0(驱动程序信息:chromedriver = 2.37.543610(afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform = Linux 4.9.80-c9 x86_64)
…implies that Chrome version must be >= 64.0 ...暗示Chrome版本必须> = 64.0
Your main issue is the version compatibility between the binaries you are using as follows: 您的主要问题是您使用的二进制文件之间的版本兼容性如下:
@Test
. @Test
。 The following error Chrome version must be >= 64.0.3282.0
, says it is NOT compatible with current chromedriver version 2.37 以下错误
Chrome version must be >= 64.0.3282.0
,表示它与当前的chromedriver版本2.37 不兼容
Updating chrome to latest version should solve the issue. 将chrome更新到最新版本应该可以解决问题。
please refer to https://sites.google.com/a/chromium.org/chromedriver/downloads . 请参阅https://sites.google.com/a/chromium.org/chromedriver/downloads 。
Latest Release: ChromeDriver 2.36
最新发布:ChromeDriver 2.36
Supports Chrome v63-65
支持Chrome v63-65
Updating the Google Chrome version to 74 worked for me. 将Google Chrome版本更新为74对我有用。
Steps: 1. Go to Help -> About Google Chrome -> Chrome will automatically look for updates(update Chrome to the latest version) 步骤: 1。转到帮助 - >关于Google Chrome - > Chrome会自动查找更新(将Chrome更新到最新版本)
Also, note that you should be having an updated chrome driver. 另请注意,您应该拥有更新的Chrome驱动程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.