所需的Chromedriver版本与Webdrivers不兼容

时间:2019-08-19 09:00:08

标签: ruby-on-rails selenium-webdriver selenium-chromedriver

自从我更新了Chrome浏览器以来,我的测试不再起作用。 我收到此错误:

Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 76

所以我替换了

# Currently I have Chrome 78 installed
Webdrivers::Chromedriver.required_version = Webdrivers::Chromedriver.current_version.to_s

作者

Webdrivers::Chromedriver.required_version = '76.0.3809.68'

但是我得到了完全一样的错误。 我也尝试过76.0.3869.25

如您所见:https://github.com/titusfortner/webdrivers/blob/master/lib/webdrivers/chromedriver.rb#L76

所需的版本存在。

我的测试正在Travis上进行。有想法吗?

1 个答案:

答案 0 :(得分:0)

我今天遇到了这个问题,并且能够解决它。...

系统:Windows10企业版桌面,Visual Studio Pro 2017

  1. 使用VS Nuget UI更新Selenium.WebDriver.Chrome程序包
  2. 通常可以,但是我继续遇到与上面相同的错误

要解决: -我转到了我的Chromedriver.exe文件并将其删除的位置。 -然后我重新构建了使用Selenium的应用程序 -我的VS应用然后加载了新的Chromedriver.exe 3.重新运行我的Selenium测试:问题已解决