Skip to content

Instantly share code, notes, and snippets.

@denyago
Created August 28, 2015 10:00
Show Gist options
  • Save denyago/0d2109fa669ed2b14050 to your computer and use it in GitHub Desktop.
Save denyago/0d2109fa669ed2b14050 to your computer and use it in GitHub Desktop.
Capybara.register_driver :en_browser do |app|
require 'selenium-webdriver'
Selenium::WebDriver::Firefox::Binary.path = '/Users/di/Applications/Firefox.app/Contents/MacOS/firefox-bin'
profile = Selenium::WebDriver::Firefox::Profile.new
profile['intl.accept_languages'] = 'en'
Capybara::Selenium::Driver.new(app, {:browser => :firefox, :profile => profile})
end
Capybara::Screenshot.prune_strategy = :keep_last_run
Capybara.javascript_driver = :en_browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment