How to download file directly using chrome driver

1,177 views
Skip to first unread message

Xie Lebing

unread,
Dec 29, 2014, 1:05:59 PM12/29/14
to seleniu...@googlegroups.com
Hello,

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):

options = new ChromeOptions();
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!

Selenium Framework

unread,
Jan 2, 2015, 11:09:32 AM1/2/15
to seleniu...@googlegroups.com
This is a ruby example, however you can map to java too

Mark Collin

unread,
Jan 8, 2015, 3:28:59 AM1/8/15
to seleniu...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages