Rails: Selenium::WebDriver::Error::WebDriverError: not executable: 'chromedriver-helper'

岁酱吖の 提交于 2019-12-23 16:34:24

问题


I've setup Rails environment two days ago and I thought things were going fine but then when I ran rake test command it got aborted due to this load error:

Bundler::GemRequireError: There was an error while trying to load the gem 'chromedriver-helper'`
`Caused by: Selenium::WebDriver::Error::WebDriverError: not executable: "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/chromedriver-helper-2.1.0/bin/chromedriver-helper"

I tried a few things but nothing worked. I reinstalled the gem and updated it. Then I tried to install an older version of it. I also tried to add gem "selenium-webdriver" and gem "chromedriver-helper" to the Gemfile

and in spec_helper.rb this:

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, browser: :chrome)
end

as mentioned on github but not sure what should I try next.

Could someone help me with this, please? Thank you.


回答1:


Encountered this issue earlier with a colleague who is working on a Windows laptop. Researched and found this thread at Github: https://github.com/flavorjones/chromedriver-helper/issues/19

This is not really a fix but is just a work around suggested by one of the participants on the thread. What we did was changed gem 'chromedriver-helper', '~> 2.1.0' to gem 'chromedriver-helper', '1.2.0' in your Gemfile.

Steps:

  1. Delete Gemlock file.

  2. Change chromedriver-helper version in your Gemfile.

  3. Run bundle install, so the change could take effect.
  4. Run the tests again.

This worked on our end.



来源:https://stackoverflow.com/questions/52630480/rails-seleniumwebdrivererrorwebdrivererror-not-executable-chromedriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!