Unable to start the chrome browser : please help me to resolve

11,917 views
Skip to first unread message

shivasha...@gmail.com

unread,
Feb 23, 2012, 12:52:15 AM2/23/12
to webdriver
package org.openqa.selenium.example;

import org.openqa.selenium.chrome.ChromeDriver;

public class Chromestart {

public static void main(String args[])

{

System.setProperty("webdriver.chrome.driver","C:\\Users\\shiva\
\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");

ChromeDriver cd = new ChromeDriver();
cd.get("http://www.yahoo.com/");

cd.getPageSource();
System.out.println("This is my chrome browser start");
}

}

Krishnan Mahadevan

unread,
Feb 23, 2012, 5:34:48 AM2/23/12
to webd...@googlegroups.com
I suggest that you take a look at :  http://code.google.com/p/selenium/wiki/ChromeDriver 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.


RanjithManne

unread,
Feb 23, 2012, 6:26:57 AM2/23/12
to webdriver
Hi Shiva,

After seting the system property, you need to create DefaultService()
instance and you can pass that instance as a parameter to your chrome
Driver.

It's working fine for me, you can Try the Following sample code:

System.setProperty("webdriver.chrome.driver",
"D:\\Ranjith\\Softwares\\chromedriver_win_18.0.1022.0\
\chromedriver.exe");
ChromeDriverService cds =
ChromeDriverService.createDefaultService();
cds.start();
ChromeDriver driver = new ChromeDriver(cds);

Regards,
Ranjith.


On Feb 23, 10:52 am, "shivashankar2...@gmail.com"

Mike Riley

unread,
Feb 23, 2012, 12:41:28 PM2/23/12
to webdriver
Or you could simply have chromedriver.exe in your system PATH.

Mike

shen xieyin

unread,
Feb 24, 2012, 1:09:22 AM2/24/12
to webd...@googlegroups.com
Recently I also start to play with Chrome automation. What's the error log you get?

shiva hosur

unread,
Feb 24, 2012, 1:24:02 AM2/24/12
to webd...@googlegroups.com
I am getting below 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.
Build info: version: '2.19.0', revision: '15849', time: '2012-02-08 16:12:19'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_24'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:436)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:139)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:94)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:86)
at org.openqa.selenium.example.Chromestart.main(Chromestart.java:13)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for ChromeDriver server to start.
Build info: version: '2.19.0', revision: '15849', time: '2012-02-08 16:12:19'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_24'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.chrome.ChromeDriverService.start(ChromeDriverService.java:166)
at org.openqa.selenium.chrome.ChromeCommandExecutor.execute(ChromeCommandExecutor.java:46)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:416)
... 5 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:14623/status, http://localhost:14623/healthz] to be available after 20003 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:86)
at org.openqa.selenium.chrome.ChromeDriverService.start(ChromeDriverService.java:164)
... 7 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:61)
... 8 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
... 9 more

shen xieyin

unread,
Feb 24, 2012, 1:29:57 AM2/24/12
to webd...@googlegroups.com
 System.setProperty("webdriver.chrome.driver","C:\\Users\\shiva\
\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");

you need to store the chromedrive.exe path for  webdriver.chrome.driver, not the chrome.exe.

shiva hosur

unread,
Feb 24, 2012, 1:46:07 AM2/24/12
to webd...@googlegroups.com
I got the below exception when I changed to Chromedrive,exe in the set property.


Exception in thread "main" java.lang.IllegalStateException: The webdriver.chrome.driver system property defined chromedriver executable does not exist: C:\Users\shiva\AppData\Local\Google\Chrome\Application\chromedrive.exe
at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:110)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:86)
at org.openqa.selenium.example.Chromestart.main(Chromestart.java:13)


2012/2/24 shen xieyin <shenx...@gmail.com>

shen xieyin

unread,
Feb 24, 2012, 1:49:26 AM2/24/12
to webd...@googlegroups.com
Can you put the chromedrive.exe  in different directory and use  webdriver.chrome.driver to  link it?

Btw, did you download  chromedrive.exe, it's in the chrome install folder by default.

shen xieyin

unread,
Feb 24, 2012, 1:49:54 AM2/24/12
to webd...@googlegroups.com

pawan

unread,
Feb 28, 2012, 9:16:02 AM2/28/12
to webdriver
Hi Shivas,
try this way, just provide the Chromedriver.exe path in the code
below or set it in the PATH,

System.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY ,"C:\
\workspace\\SanityFB\\lib\\chromedriver.exe");
  ChromeDriver driver = new ChromeDriver();
driver.get("http://www.yahoo.com/");
>
>         driver.getPageSource();
>         System.out.println("This is my chrome browser start");

On Feb 23, 10:52 am, "shivashankar2...@gmail.com"
<shivashankar2...@gmail.com> wrote:

Pushpraj Singh

unread,
Nov 19, 2012, 2:15:30 AM11/19/12
to webd...@googlegroups.com
I am able to launch chrome via webdriver , it was easy...
Here is the code that worked for me :

   System.setProperty("webdriver.chrome.driver","/Users/admin/Desktop/mybackup/Testing/chromedriver");

   ChromeDriver cd = new ChromeDriver();
   cd.get("http://www.yahoo.com/");
   cd.getPageSource();
   System.out.println("This is my chrome browser start");


Here is the link of chrome drivers , you should have on your path

sheetal singh

unread,
Nov 19, 2012, 6:08:11 AM11/19/12
to webd...@googlegroups.com
Hi,

I am able to open chrome but third party proxy setting comes in between and asking for username/password.
Do someone has any idea?

ChromeOptions options = new ChromeOptions();
options.addArguments("no-sandbox");
driver=new ChromeDriver(options);


Regards
Sheetal

On Tuesday, 28 February 2012 19:46:02 UTC+5:30, pawan wrote:

Red

unread,
Jan 9, 2014, 11:08:56 AM1/9/14
to webd...@googlegroups.com
Hi ,

I am unable to Open Chrome Browser at my mc.
Please help me
Thanks,
Red
---------------------------

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class chrome {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        System.setProperty("Webdriver.chrome.driver",
                  "C:\\Users\\snomula\\.m2\\repository\\org\\seleniumhq\\selenium\\selenium-chrome-driver.exe");

         WebDriver driver=new ChromeDriver();
         driver.get("http://jqueryui.com/droppable/");
    }

}


Error Logs :


Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
    at com.google.common.base.Preconditions.checkState(Preconditions.java:177)
    at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:105)
    at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:75)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
    at chrome.main(chrome.java:12)

darrell

unread,
Jan 10, 2014, 7:55:22 AM1/10/14
to webd...@googlegroups.com
You have set webdriver.chrome.driver incorrectly. For Chrome you will have the Selenium libraries, ChromeDriver.exe and the actual browser (Chrome.exe). You need to set webdriver.chrome.driver to point at the ChromeDriver.exe NOT the Chrome.exe. As Krishnan points you, read the wiki for more details.

Prakash U

unread,
Mar 13, 2014, 7:05:37 AM3/13/14
to webd...@googlegroups.com
if i use this coding i got only  error and it wil be open the chrome bt i set driver.get("www.google.com"); and it does not open


 System.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe");

         
                        ChromeDriverService cds = ChromeDriverService.createDefaultService(); 
                        cds.start(); 
                        ChromeDriver driver = new ChromeDriver(cds); 

         
         driver.get("http://www.google.com");
              



Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'DOM-PC', ip: '100.76.80.237', os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0-ea'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
at org.openqa.selenium.example.speechtotext.main(speechtotext.java:39)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18609/status] to be available after 20006 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)
... 1 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)
... 2 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:258)
at java.util.concurrent.FutureTask.get(FutureTask.java:119)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
... 3 more
Java Result: 1
Reply all
Reply to author
Forward
0 new messages