Disable multiple downloads notification

265 views
Skip to first unread message

amit...@gmail.com

unread,
Oct 21, 2015, 10:10:28 AM10/21/15
to ChromeDriver Users

Hi!

I am using Selenium web drive with Chromedriver in order to develop and run UI tests. In one of my tests I am downloading two images and compare them during the tests. Knowing that chrome is going to notify me about trying to download more than one file, I've added this line to the driver initialization function:

var options = new ChromeOptions();
.
.
.
options.AddUserProfilePreference("profile.content_settings.pattern_pairs.*,*.multiple-automatic-downloads", 1);

This has worked for me until today, when I upgraded chrome to version 46.0.2490.71. As from today, the message pops up again, failing my tests.

I tried to upgrade to the latest webdriver and latest chromedriver but it didn't help.

Any suggestions? Thanks a lot!
Amit

gmani...@google.com

unread,
Nov 2, 2015, 7:19:12 PM11/2/15
to ChromeDriver Users
Looks like Chrome Preferences have been changed.

Please try below for Chrome v46.0.2490.80

ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.automatic_downloads", 1);
options.setExperimentalOption("prefs", prefs);
ChromeDriver driver = new ChromeDriver(options);
Reply all
Reply to author
Forward
0 new messages