I'm using Selenium Web Driver and C# to automate automatically downloading an executable when I click on a link in Firefox.
FirefoxProfile profile = new FirefoxProfile();
profile.AcceptUntrustedCertificates = true;
profile.SetPreference("browser.download.folderList", 2);
profile.SetPreference("browser.download.manager.showWhenStarting", false);
profile.SetPreference("browser.download.dir", "c:\\Test");
profile.SetPreference("browser.helperApps.alwaysAsk.force", false);
profile.SetPreference("browser.helperApps.neverAsk.saveToDisk", "application/octet-stream");
IWebDriver driver = new FirefoxDriver(profile);
When I click the link, it still shows the Save dialog, but it does save it to my Test folder if I click Save. I'm using Firefox 21. How do I ensure the Save dialog doesn't appear and the download happens automatically?