Cucumber; Selenium WebDriver - how to use Google Chrome as the testing browser instead of Firefox

前端 未结 6 2052
死守一世寂寞
死守一世寂寞 2020-12-23 15:02

For a Cucumber scenario on my Rails 3.1 app, I used the @javascript tag, so Selenium is activated. I get the following error:

Could not find Firefox binary (         


        
6条回答
  •  失恋的感觉
    2020-12-23 15:29

    Today the easiest way to get the chromedriver executable seem to be installing the chromedriver-helper gem. Please see https://github.com/flavorjones/chromedriver-helper for details.

    Besides installing the gem you'll have to configure your environment the same way as already mentioned in several other answers:

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

提交回复
热议问题