I am using Cucumber with Capybara to run an automation test on a Jenkins server. Everything works fine with Firefox. However, I’m having trouble setting up Google Chrome and ChromeDriver. I installed Google Chrome and ChromeDriver (I moved the chrome recorder to usr / bin / chromedriver), but when I run the test, it notifies me of an error:
"Unable to find the chromedriver executable. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver."
Below is my setup in env.rb for the Chrome driver:
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome, :switches =>
%w[--ignore-certificate-errors --disable-popup-blocking])
end
How to set the path to ChromeDriver when register_driver? Has anyone experienced this problem before? Many thanks.
source
share