0

I'm running automated regression tests using Selenium and am running into a few issues. Previously my ChromeDriver would click on a link that downloaded a file to the default directory provided in my ChromeOptions but now it is presenting me with a SaveAs dialog in the browser instead of just auto-downloading the file.

Is there a way to disable the SaveAs dialog and just auto-downloading the file to my default directory?

Below the settings for my ChromeDriver..

var driverOptions = new ChromeOptions();
driverOptions.AddUserProfilePreference("download.default_directory", BaseCommon._chromeDefaultDownloadsFolder);
driverOptions.AddUserProfilePreference("intl.accept_languages", "nl");
driverOptions.AddUserProfilePreference("profile.default_content_settings.popups", "0");
driverOptions.AddUserProfilePreference("disable-popup-blocking", "true");
var driverPath = System.IO.Directory.GetCurrentDirectory();
Instance = new ChromeDriver(driverPath, driverOptions);
TheAuzzieJesus
  • 587
  • 9
  • 23
  • This answer may solve your problem: http://stackoverflow.com/questions/34515328/how-to-set-default-download-directory-in-selenium-chrome-capabilities – Almett Apr 28 '17 at 02:22
  • @AlimjanMettursun Just tested it and it doesn't solve my problem. It still asks for a save file dialog. – TheAuzzieJesus Apr 28 '17 at 03:27
  • Setting the option: "download.default_directory" works for me. Make sure the value that you're passing into it is a valid path. – Michiel Bugher May 10 '17 at 20:33

0 Answers0