Forum Discussion
sankar6270
Jun 09, 2020Copper Contributor
Edge Preference setup for Selenium
Team, 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 ava...
- Jun 10, 2020
sankar6270 I think this article will help: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium?tabs=c-sharp
-John
johnjansen
Jun 10, 2020Microsoft
sankar6270 I think this article will help: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium?tabs=c-sharp
-John
- sankar6270Jun 11, 2020Copper Contributor
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); edgePrefs.put("profile.content_settings.pattern_pairs.*,*.multiple-automatic-downloads",1); EdgeOptions egdeOptions = new EdgeOptions(); egdeOptions.setExperimentalOption("prefs",edgePrefs);
Thanks Again johnjansen .