Created
July 11, 2019 12:17
-
-
Save seleniumgists/b384cfda2d707f8a899ac37b8dd46696 to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Capybara.register_driver :selenium do |app| | |
browser = ENV['BROWSER'] | |
browser_sym = browser.to_sym | |
options = { | |
browser: browser_sym, | |
} | |
if browser == :firefox | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile['browser.download.folderList'] = 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 | |
Capybara::Selenium::Driver.new(app, options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment