Im trying to enable popup in selenium. Could not do it so far. pleas help My code : ieOptions.attachToEdgeChrome(); ieOptions.setCapability("ignoreProtectedModeSettings ", true); ieOptions.enablePersistentHovering(); ieOptions.requireWindowFocus(); capabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true); capabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false); capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); capabilities.setCapability(CapabilityType.SUPPORTS_ALERTS, true); capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT); ieOptions.withEdgeExecutablePath(“C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe”); ieOptions.merge(capabilities);
Hi Manny,
Here’s the code snippet to enable all pop-ups in Safari or IE for desktop devices:
EdgeOptions options = new EdgeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
Map<String, Object> profile = new HashMap<String, Object>();
Map<String, Object> contentSettings = new HashMap<String, Object>();
// SET EDGE OPTIONS
// 0 - Default, 1 - Allow, 2 - Block
contentSettings.put("notifications", 1);
profile.put("managed_default_content_settings", contentSettings);
prefs.put("profile", profile);
options.setExperimentalOption("prefs", prefs);