0

I am new to selenium, Trying out following File f = new File("/usr/bin/google-chrome"); System.setProperty("webdriver.chrome.driver", f.getAbsolutePath()); WebDriver driver = new ChromeDriver(); //wait = new WebDriverWait(driver, 30); driver.get("http://www.google.com");

Empty chrome tab been opening but url "www.google.com" not loading. After few seconds getting error

exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:11037/status] to be available after 20002 ms
  1. Why it is trying to connect localhost at "X"(changing) instead of loading google webpage.

  2. How can i overcome this one getting same problem with Firefox also occuring.

Siva Kumar
  • 342
  • 2
  • 5
  • 16

2 Answers2

1

UnreachableBrowserException normally occurs when your code fails to connect with browser. It may be because of your driver executable or browser executable.

Please check -

  • Selenium Server jar version compatibility with browser version.
  • Path of driver executable.
  • Version of executable (based on browser version)

If issue exists then please mention build info and system info in the exception details.

Sameer Patil
  • 413
  • 2
  • 9
0
System.setProperty("webdriver.chrome.driver","your path to chrome driver.exe file ");
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");

Try this

My path is //users//hari//chromedriver.exe