I am using the latest selenium chromedriver_win32_2.25 driver. Today after I updated the my Chrome to 54.0.2840.87. I can not do the auto downloading. The Chrome will pop up and window "XXX.zip is malicious, and Chrome has blocked it" . I found out I can disable this alert by turning off the Chrome option "Protect you and your device from dangerous sites". This is the opposite way to allowing auto download before (Check the post How to disable 'This type of file can harm your computer' pop up)
The following code is not working:
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("safebrowsing.enabled", "false");
prefs.put("safebrowsing.malware.enabled", "false");
prefs.put("download.prompt_for_download", "false");
prefs.put( "profile.content_settings.pattern_pairs.*.multiple-automatic-downloads", 1 );
prefs.put("download.default_directory", downloadDir);
options.setExperimentalOption("prefs", prefs);
Not sure what is the lastest parameters for the "Protect you and your device from dangerous sites"
Seems prefs.put("safebrowsing.enabled", "false"); not working.