Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
generated automatically from #selenium on seleniumhq slack
Capybara.register_driver :selenium do |app|
browser = ENV['BROWSER']
browser_sym = browser.to_sym
options = {
browser: browser_sym,
if browser == :firefox
profile =
profile[''] = 2
profile['browser.helperApps.neverAsk.saveToDisk'] = 'text/csv'
profile['dom.max_script_run_time'] = Configuration['browser']['wait_time']
profile['general.useragent.override'] = 'customized user-agent'
profile['dom.max_chrome_script_run_time'] = Configuration['browser']['wait_time']
profile['dom.max_script_run_time'] = Configuration['browser']['wait_time']
options[:profile] = profile
elsif browser == :chrome
end, options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.