My application doesn't work in the Edge browser, but works fine in the Edge Browser(Version 105) with IE Compatibility Mode. Am using Selenium 4
I have tried to invoke the EDGE browser in IE Mode and ended up in the following error:
Only local connections are allowed
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070002 ('The system cannot find the file specified.') for URL 'http://localhost:52310/'
Build info: version: '4.1.1', revision: 'e8fcc2cecf'
System info: host: 'ABCDEFGHIJ', ip: '12345678', os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: internet explorer, se:ieOptions: {ie.edgechromium: true, ie.edgepath: C:\Program Files (x86)\Micr...}}], desiredCapabilities=Capabilities {browserName: internet explorer, ie.edgechromium: true, ie.edgepath: C:\Program Files (x86)\Micr..., se:ieOptions: {ie.edgechromium: true, ie.edgepath: C:\Program Files (x86)\Micr...}}}]
Capabilities {}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:84)
I have followed the guidelines given in the below link:
https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ie-mode?tabs=java
And am using 2016 Windows VM and the code I used as below
System.setProperty("webdriver.ie.driver", GlobalSettings.IE_DRIVER_PATH);
InternetExplorerOptions IEOptionsEdge = setInternetExlopererForEdge();
driver = new InternetExplorerDriver(IEOptionsEdge);
private static InternetExplorerOptions setInternetExlopererForEdge()
{
InternetExplorerOptions IEOptions = new InternetExplorerOptions();
IEOptions.attachToEdgeChrome();
IEOptions.ignoreZoomSettings();
IEOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
return IEOptions;
}