Edge in IE Mode - How to disable pop-up block

I am testing a legacy web application, which works only in IE browser.
I have a requirement to test the legacy application in Edge browser in IE mode. I followed the below document to implement the same.

I am able to invoke the legacy site in Edge browser in IE mode. But I am unable to disable pop-up block via automation.

Below is my keyword.

@Keyword
def openBrowser(String url) {
String path = RunConfiguration.getProjectDir() + "/driver/IEDriverServer_4.0.exe"
System.setProperty("webdriver.ie.driver", path);

InternetExplorerOptions edgeIe11Options = new InternetExplorerOptions();
Map<String, Object> ops = (Map<String, Object>) edgeIe11Options.getCapability("se:ieOptions");
ops.put("ie.edgechromium", true);

ops.put("ie.edgepath", "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
edgeIe11Options.setCapability("ignoreProtectedModeSettings", true);
edgeIe11Options.setCapability("ignoreZoomSetting", true);

edgeIe11Options.setCapability("introduceFlakinessByIgnoringProtectedModeSettings", true);

//	edgeIe11Options.setCapability("initialBrowserUrl",url)  // Working

driver = new InternetExplorerDriver(edgeIe11Options);
driver.get(url)

//Mazimize current window		
driver.manage().window().maximize();
DriverFactory.changeWebDriver(driver)
}

https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/ie/InternetExplorerOptions.html

Popup block is a known issue in IE driver and the same is fixed in ie driver v4.3.0.0.

Updating the IE driver solved my problem.

v4.3.0.0
========
* fix Edge IE mode issue that sometimes cannot get the handle of a newly opened window (#10702)
* Disable popup blocking for Edge in IE Mode (#10869)
2 Likes