The blog gives you idea of testing and automation testing example of selenium webdriver,SQl and Jmeter, you see the basic example of selenium web driver and get idea how to do automation testing,

Selenium UnreachableBrowserException - “Could not start a new session”

Some time selenium unable to reached the browser and through some exception : "Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure."
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'SmithPC', ip: '10.0.2.15', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_45'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:171)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:160)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:117)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

To resolve this you have to do only small changes in the host file.


Host file Location : C:\Windows\System32\drivers\etc

In your host file you have to add localhost entry, as i mention below then run your Selenium or Testng code and check it will work fine.

127.0.0.1            Localhost


I am encounter the same problem, after a long search will found this solution and it worked for me, I hope it will work for you also. 

No comments

Post a Comment

Powered by Blogger.