Selenium Edge with IEMode( IEDriverServer (4.0.0.0) Unable to create session when run on locked VDI #15
Description
What happened?
Scenario- Execution of the selenium code in the locked window or on some remote desktop.
Issue- Following error is encountered whenever the selenium script is put on execution while window is locked.
Error- java.net.SocketException: Connection reset.
Same code is working fine when the window is unlocked. Though I have used the "requireWindowFocus()" capability also yet the issue persists.
It works fine even with IE using same IE driver.. no error on locking the window...Only IE comp mode in edge is generating the error on locking the window...
Are there any specific settings or capabilities that needs to be enabled to resolve this issue?
The above scenario works with the following setup
Selenium 4
IE Driver Server 4.0.0
IE 11.
The above scenario doesn't work with following setup
Selenium 4
IE Driver Server 4.0.0
IE Compatibility mode in Edge
How can we reproduce the issue?
here is the code that is being used to launch the browser in IE compatibility mode in Edge.
private WebDriver initIEDriver(String appURL) {
try {
System.out.println("Launching Internet Explorer with new profile..");
System.setProperty("webdriver.ie.driver", "Driver\\IEDriverServer.exe");
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"); // Edge Browser directory path
edgeIe11Options.introduceFlakinessByIgnoringSecurityDomains();
edgeIe11Options.ignoreZoomSettings();
edgeIe11Options.enablePersistentHovering();
edgeIe11Options.takeFullPageScreenshot();
edgeIe11Options.setCapability("nativeEvents", false);
edgeIe11Options.requireWindowFocus();
edgeIe11Options.destructivelyEnsureCleanSession();
edgeIe11Options.setCapability("ignoreProtectedModeSettings", true);
edgeIe11Options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE);
this.driver = new InternetExplorerDriver(edgeIe11Options);
System.out.println("t1");
this.driver.manage().window().maximize();
this.driver.manage().timeouts().pageLoadTimeout(60L, TimeUnit.SECONDS);
this.driver.manage().timeouts().implicitlyWait(60L, TimeUnit.SECONDS);
this.driver.get(appURL);
} catch (Exception var4) {
System.out.println("Error in InternetExplorer-->" + var4.getMessage());
}
return this.driver;
}
Relevant log output
Whenever we lock the window the following error is encountered otherwise it executes fine with unlocked window..
Error in InternetExplorer-->java.net.SocketException: Connection reset
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:01:39.354Z'
Operating System
Window 10
Selenium version
Selenium 3.7.1
What are the browser(s) and version(s) where you see this issue?
IECompatibility mode in Edge... IE11 and Edge exe - Version 100.0.1185.44
What are the browser driver(s) and version(s) where you see this issue?
InternetExplorerDriver server (32-bit) 4.0.0.0 . Its not navigate to the URL while run on locked window/VDI and throws Error- java.net.SocketException: Connection reset