0

All I am Testing the web automation script using IE Mode in the edge browser I am using 4.8.1 IE driver 32-bit, and selenium 4.0.1 works very well for me but when I minimize the screen or lock the screen it will stick to initialize browser page only

public class AlertPopUp {

public static void main(String[] args) {
    // TODO Auto-generated method stub

    System.setProperty("webdriver.ie.driver", "D:\\AlertPopUp\\IEDriverServer.exe");

    RemoteWebDriver driver = null;

    try {
    
        InternetExplorerOptions ieOptions = new InternetExplorerOptions();
        

        
        ieOptions.attachToEdgeChrome();
        ieOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
        ieOptions.requireWindowFocus();
        ieOptions.setCapability("ignoreProtectedModeSettings", true);
        ieOptions.ignoreZoomSettings();
        ieOptions.destructivelyEnsureCleanSession();
        ieOptions.setCapability (InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, false) ;
        ieOptions.setCapability ("disable-popup-blocking", true);
        driver = new InternetExplorerDriver(ieOptions);
        driver.manage().window().maximize();
        driver.get("https://www.google.com/");
        
        
        driver.quit();
        
        
        
        
        
    

    } catch (Exception e) {
        // TODO: handle exception
        e.printStackTrace();
    }

}

} Exception:- Started InternetExplorerDriver server (32-bit) 4.8.1.0 Listening on port 29726 Only local connections are allowed org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'AJAX', ip: '192.168.0.106' Build info: version: '4.8.0', revision: '267030adea' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.4.1' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Command: [null, newSession {capabilities=[Capabilities {browserName: internet explorer, disable-popup-blocking: true, se:ieOptions: {enablePersistentHover: false, ie.edgechromium: true, ie.edgepath: C:\Program Files (x86)\Micr..., ignoreProtectedModeSettings: true, ignoreZoomSetting: true, requireWindowFocus: true}}], desiredCapabilities=Capabilities {browserName: internet explorer, disable-popup-blocking: true, se:ieOptions: {enablePersistentHover: false, ie.edgechromium: true, ie.edgepath: C:\Program Files (x86)\Micr..., ignoreProtectedModeSettings: true, ignoreZoomSetting: true, requireWindowFocus: true}}}] Capabilities {} at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:561) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:229) at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:153) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:140) at org.openqa.selenium.ie.InternetExplorerDriver.(InternetExplorerDriver.java:117) at testpopup.AlertPopUp.main(AlertPopUp.java:42) Caused by: java.lang.RuntimeException: NettyHttpHandler request execution error at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:76) at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42) at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56) at org.openqa.selenium.remote.http.netty.NettyHttpHandler.execute(NettyHttpHandler.java:49) at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42) at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56) at org.openqa.selenium.remote.http.netty.NettyClient.execute(NettyClient.java:99) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:124) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:106) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156) at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:167) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543) ... 5 more Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timeout to localhost/127.0.0.1:29726 after 180000 ms at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096) at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:206) at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:59) ... 18 more Caused by: java.util.concurrent.TimeoutException: Request timeout to localhost/127.0.0.1:29726 after 180000 ms at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43) at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:50) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:833)

enter image description here

1 Answers1

0

It seems a known issue of IEDriver. You can refer to this GitHub issue. The Edge team is aware of the issue but hasn't provide a fix for it. The suggestion from the official member in the last comment is below:

I'd recommend working around this by running any tests that require IE on a dedicated machine or VM that can remain logged in interactively.

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22