Create a gist now

Instantly share code, notes, and snippets.

Tweaking Firefox preference to automatically download files to custom location
Capybara.register_driver :selenium do |app|
profile =
profile[''] = "#{Rails.root}/tmp/webdriver-downloads"
profile[''] = 2 # implies custom location
profile['browser.helperApps.neverAsk.saveToDisk'] = "text/csv,application/pdf", :browser => :firefox ,:profile => profile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment