1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Fix Chrome download settings

This commit is contained in:
Thomas Walpole 2019-12-28 07:59:51 -08:00
parent a76a35fbc8
commit 5d24424b13

View file

@ -14,7 +14,8 @@ browser_options = ::Selenium::WebDriver::Chrome::Options.new
browser_options.headless! if ENV['HEADLESS']
browser_options.add_option(:w3c, ENV['W3C'] != 'false')
# Chromedriver 77 requires setting this for headless mode on linux
# browser_options.add_preference('download.default_directory', Capybara.save_path)
# Different versions of Chrome/selenium-webdriver require setting differently - jus set them all
browser_options.add_preference('download.default_directory', Capybara.save_path)
browser_options.add_preference(:download, default_directory: Capybara.save_path)
Capybara.register_driver :selenium_chrome do |app|