Skip to content

@karthiks /automation_spec_helper.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tweaking Firefox preference to automatically download files to custom location
Capybara.register_driver :selenium do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.download.dir'] = "#{Rails.root}/tmp/webdriver-downloads"
profile['browser.download.folderList'] = 2 # implies custom location
profile['browser.helperApps.neverAsk.saveToDisk'] = "text/csv,application/pdf"
Capybara::Selenium::Driver.new(app, :browser => :firefox ,:profile => profile)
#...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.