ruby-watir

How to download a file using Watir 6.0

ぃ、小莉子 提交于 2019-12-23 03:45:08
问题 I'm trying to download a CSV file with the new Watir 6.0. I found the profile settings for Firefox: profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.folderList'] = 2 profile['browser.download.dir'] = path_to_download profile['browser.helperApps.neverAsk.saveToDisk'] = "text/csv" browser = Watir::Browser.new :firefox, :profile => profile But Firefox 50.0 doesn't support loading profile settings. I get this error message: /var/lib/gems/2.3.0/gems/selenium-webdriver

How to download a file using Watir 6.0

早过忘川 提交于 2019-12-07 01:05:30
I'm trying to download a CSV file with the new Watir 6.0. I found the profile settings for Firefox: profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.folderList'] = 2 profile['browser.download.dir'] = path_to_download profile['browser.helperApps.neverAsk.saveToDisk'] = "text/csv" browser = Watir::Browser.new :firefox, :profile => profile But Firefox 50.0 doesn't support loading profile settings. I get this error message: /var/lib/gems/2.3.0/gems/selenium-webdriver-3.0.0/lib/selenium/webdriver/remote/w3c_bridge.rb:80:in `initialize': unknown option: {:profile=>#