Disable chrome download multiple files confirmation Disable chrome download multiple files confirmation google-chrome google-chrome

Disable chrome download multiple files confirmation


I'm using Chrome 49 and none of the other solutions worked for me.After some research I found a working solution:

ChromeDriver createChromeDriverWithDownloadFolder(String folder) {    Map<String, Object> chromePrefs = new HashMap<String, Object>();    chromePrefs.put("profile.default_content_settings.popups", 0);    chromePrefs.put("download.default_directory", folder);    chromePrefs.put("profile.content_settings.exceptions.automatic_downloads.*.setting", 1 );    chromePrefs.put("download.prompt_for_download", false);    ChromeOptions options = new ChromeOptions();    options.setExperimentalOption("prefs", chromePrefs);    DesiredCapabilities cap = DesiredCapabilities.chrome();    cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);    cap.setCapability(ChromeOptions.CAPABILITY, options);    return new ChromeDriver(cap);}

It seems as if these settings are constantly changing. Therefore, here's how I found the right solution for my setup:

  1. Open Chrome and go to chrome://version/ to find the path of your profile
  2. In Default/Preferences is a json file called Preferences. Open it and search for automatic_downloads.In my case the interesting part of the file looked like this:

    ..."profile": {"avatar_bubble_tutorial_shown": 1,"avatar_index": 0,"content_settings": {"clear_on_exit_migrated": true,"exceptions": {"app_banner": {},"auto_select_certificate": {},"automatic_downloads": {"[.]localhost:63342,": {"setting": 1},...

  3. From that I could derive that the right setting would be chromePrefs.put("profile.content_settings.exceptions.automatic_downloads.*.setting", 1 );


As of Chrome 56.0.2924.87, February 17, 2017, the only preference you need to set (however you set them for your webdriver) is:

'profile.default_content_setting_values.automatic_downloads': 1

Giving an updated answer because most answers here use outdated preferences or show other preferences that are unnecessary.


for new chrome (version 46 or newer) this options was changednow your hash must looks like this:

prefs = {    'profile' => {        'default_content_settings' => {'multiple-automatic-downloads' => 1}, #for chrome version olde ~42        'default_content_setting_values' => {'automatic_downloads' => 1}, #for chrome newer 46    }}browser = Watir::Browser.new :chrome, options: {prefs: prefs, args: ['--test-type', '--disable-infobars'}