Reputation: 157
I know there are number of threads running but none of them has a solution of this problem. I am trying to get a aspx page using selenum. But it throws UnreachableBrowserException at this line of code WebDriver driver = new ChromeDriver();
. An instance of chrome is opening but then later on after few seconds it throws the exception I have mentioned above.
Here is my sample code.
System.setProperty("webdriver.chrome.driver",
"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://some aspx page with form");
System.out.println("!!!!! Got the page !!!!!");
driver.close();
driver.quit();
Following is the stacktrace.
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.
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'E7D4C9EFE70614', ip: '192.168.1.12', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_45'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:567)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:218)
at org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:181)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:113)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:117)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:160)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:149)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:106)
at HtmlParser.main(HtmlParser.java:31)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'E7D4C9EFE70614', ip: '192.168.1.12', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_45'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:62)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:546)
... 8 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:12233/status] to be available after 20008 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)
... 10 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
... 11 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
... 12 more
I have red number of articles but couldnot find any solution. My chrome version is 33.0.1750.154 m.
Upvotes: 4
Views: 22855
Reputation: 157
I have downloaded chromedriver
and instead of setting path to chrome.exe
I set the path to chromedriver.exe
and it worked.
C:\Program Files(x86)\chromedriver\chromedriver.exe
Upvotes: 4