gem selenium-webdriver 3.2.2
FF 51.0.1(64位)
OS Ubuntu 16.04
我没有运行测试,得到错误。
Selenium::WebDriver::Error::WebDriverError:
Unable to find Mozilla geckodriver. Please download the server from https://github.com/mozilla/geckodriver/releases and place it somewhere on your PATH. More info at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver.
我建立了geckodriver 1.14.0,但错误仍然存在。
答案 0 :(得分:3)
将它放在你的Gemfile
上# Gemfile
gem 'geckodriver-helper'
然后在您的spec_helper文件中
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, browser: :firefox)
end