2

I'm trying to automate my test cases using Selenium with the following software applications.

  • WebDriver 3.12.0
  • InternetExplorerDriver3.150.1
  • IE11 browser
  • Java1.8.0.231

Here's my script to initialize the driver.

System.setProperty("webdriver.ie.driver","driver path");
driver = new InternetExplorerDriver();
System.out.println("Driver initialized.");
driver.get("application web url");

For the above script, I'm getting the below error message.

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session....

I have tried with different versions of drivers and selenium webdriver. But didn't workout. What could be the cause and how can I resolve it?

Could anyone give me your suggestions?

Thanks,
Karunagara Pandi G

DebanjanB
  • 118,661
  • 30
  • 168
  • 217
Karunagara
  • 369
  • 1
  • 6
  • 24
  • This error can be occurred due to compatibility issue. make sure that Selenium web driver version, IE driver version, IE browser all are using the latest version. You can download the compatible version from this link . Ref:https://selenium.dev/downloads/ – Deepak-MSFT Nov 20 '19 at 10:29

1 Answers1

1

This error message...

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session....

...implies that the IEDriverServer was unable to initiate/spawn a new WebBrowsing Session i.e. InternetExplorer Browser session.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • Your Selenium WebDriver Client version is 3.12.0 which is a bit older.
  • Your InternetExplorerDriver version 3.150.1.

So there is a clear mismatch between Selenium Client v3.12.0 , IEDriverServer v3.150.1.


Solution

  • Upgrade Selenium to current levels Version 3.141.59.
  • Upgrade IEDriverServer to IEDriverServer v3.141.59 or IEDriverServer v3.150.0 level.
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Execute your Test as a non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

tl; dr

DebanjanB
  • 118,661
  • 30
  • 168
  • 217