Chhagan Chavan
Chhagan Chavan

Reputation: 1

Could not start new session. Possible causes are invalid address of the remote server or browser start-up failure

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

Answers (1)

Kendrick Li
Kendrick Li

Reputation: 3046

As common solutions regarding this error, I suggest

  1. Kill all the IEDriverServer.exe and then you can test again.
  2. Make sure that you've closed/quitted the driver every time before the automation ends.

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:

  1. Turn off protected mode of each zone in Internet Options
  2. Use 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

Related Questions