I'm trying to run a simple code from eclipse, but I keep on getting " org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.". The browser opens, but it fails as the url I intend to open doesn't open.

2,495 views
Skip to first unread message

Prashansa Gupta

unread,
Sep 8, 2019, 2:48:47 AM9/8/19
to Selenium Users
The browser starts, but it never opens the URL.
I am using Chrome browser (version : 76.0.3809.132), and I have Windows 10.

Can someone please help me with this ?

My code:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class BrowserTest {
 public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");
System.out.println("System properties set !");
WebDriver  driver = new ChromeDriver();
System.out.println("Chrome driver set !");
driver.get("http://www.google.com");
}
}


The console output:
System properties set !

Opening in existing browser session.
Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-INVADUA', ip: '192.168.43.94', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:202)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:188)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at BrowserTest.main(BrowserTest.java:10)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:12357/status] to be available after 20002 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:197)
... 9 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:156)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 10 more

⇜Krishnan Mahadevan⇝

unread,
Sep 8, 2019, 2:53:53 AM9/8/19
to Selenium Users
Please change the line 

System.setProperty("webdriver.chrome.driver", "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");

and have it point to chromedriver (not chrome browser executable location)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c2276a64-7aee-43fa-a931-ca771f5271a4%40googlegroups.com.

Prashansa Gupta

unread,
Sep 8, 2019, 12:23:44 PM9/8/19
to Selenium Users
Thank you so much. It worked ! :)
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages