I learned how to use Firefox 4 using watir and webdriver (on Win7 x64) by setting profile parameters. Example:
profile = Selenium::WebDriver::Firefox::Profile.new profile["browser.download.useDownloadDir"] = true profile["browser.download.dir"] = 'D:\\FirefoxDownloads' profile["browser.helperApps.neverAsk.saveToDisk"] = "application/csv" driver = Selenium::WebDriver.for :firefox, :profile => profile browser = Watir::Browser.new(driver)
What I'm trying to do with the example below is that CSV files are always loaded into a specific directory that never opens. In the above code, it is possible to install all the files automatically downloaded to the specified directory, but installing browser.helperApps.neverAsk.saveToDisk has no effect: I still get the open / save question. After running the script, the Firefox window is still open, and I enter the URL: config. I see that browser.helperApps.neverAsk.saveToDisk was correctly installed in application.csv , but in firefox / options / options / applications I do not see entries for CSV files. It seems that setting the menu, which is really effective, is not really related to setting about: config. What am I doing wrong?
source share