I developed a crawler with ruby watir-webdriver that downloads some files from a page. My problem is that when I click to download the second file, Chrome opens a bar in the
Here is the solution for Java - Selenium implementation
We faced hard time fixing this, as we wanted to add automation test for functionality which downloads set of PDFs on a single download link.
Map prefs = new HashMap();
//To Turns off multiple download warning
prefs.put("profile.default_content_settings.popups", 0);
prefs.put( "profile.content_settings.pattern_pairs.*.multiple-automatic-downloads", 1 );
//Turns off download prompt
prefs.put("download.prompt_for_download", false);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOptions("prefs", prefs);
driver = new ChromeDriver(options);
Hope this help to someone.