Edge Preference setup for Selenium

New Contributor



For selenium execution we need to setup browser preferences to avoid the notification displaying while running the test in EDGE browser


Please let me know if we have any edgeoptions available. we need settings at least for following notifications

1. multiple file download notification

2. allow notifications?



Sankar Palanisamy



2 Replies
best response

@johnjansen Thanks a lot. Actually i was tried with selenium  3.141.59. now it is working fine with 4.0.0-alpha-6. Because setExperimentalOption added in 4.0.0-alpha.

my code be like

HashMap<String, Object> edgePrefs = new HashMap<String, Object>();
edgePrefs.put("profile.default_content_settings.popups", 0);
edgePrefs.put("profile.default_content_setting_values.notifications", 2);		
edgePrefs.put("profile.default_content_setting_values.automatic_downloads" , 1);		
EdgeOptions egdeOptions = new EdgeOptions();

Thanks Again @johnjansen .