org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session error with Selenium and IE11 using Java org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session error with Selenium and IE11 using Java selenium selenium

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session error with Selenium and IE11 using Java


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