Reputation: 1
I'm using selenium IE Driver 4.7 to run code on Microsoft edge in IE mode. Code run successfully but when we disconnect from server then after some intervals of time there is an error comes as "Error communicating with the remote browser.It may have died." After that when BOT runs same code then captions error occurred (could not session).But same code work in IE after server disconnect also.
Sample code for calling edge in IE mode,
System.setProperty("webdriver.ie.driver", "IE Driver Path"); InternetExplorerOptions ieOptions = new InternetExplorerOptions();
ieOptions.attachToEdgeChrome ();
ieOptions.ignore ZoomSettings ();
ieOptions.withEdgeExecutable Path ("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
driver = new InternetExplorerDriver (ieOptions);
driver.manage().deleteAllCookies();
driver.manage () .window () .maximize();
driver.get("https://www.finacle.com");
Help me out to sort out this issue.
I also tried selenium IE Driver 4.2 version but not worked. Current selenium jar version is 4.2.2.
I'm need java selenium code (for automation on ie) to be run in IE mode on ms edge without facing mentioned error due server disconnected.
Upvotes: 0
Views: 828
Reputation: 3046
As common solutions regarding this error, I suggest
Since it works in IE while fails in IE mode, it can also be related to the timeout error in IE mode automation. 2 solutions to this are:
InitialBrowserUrl
to directly visit the desired page, without waiting for redirection which could cause timeout error. Example: ieOptions.InitialBrowserUrl = "https://www.bing.com";
Upvotes: 0