I am using chromedirver (v2.9.248304) with Ubuntu 64. Following the instruction from stack overflow, i launch the chrome with following option (which works on Mac OS):
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("download.default_directory", ".......................................");
//Turns off multiple download warning
prefs.put( "profile.content_settings.pattern_pairs.*.multiple-automatic-downloads", 1 );
//Turns off download prompt
prefs.put("download.prompt_for_download", false);
options.setExperimentalOption("prefs", prefs);
Seemed that Linux chromedriver does not respect the option at all. Need help and thank you in advance!