Can't Find ChromeDriver Executable

3,262 views
Skip to first unread message

Richard Bradshaw

unread,
May 11, 2012, 4:57:46 AM5/11/12
to Selenium Users
Hello Everyone,

I have looked across all posts I still cannot get this to work.
I have a GRID instance set up on one machine, and have a node
configured on another.

I have created a json config file for the node, and tried to pass the
location of the chromedriver in that, however its still complaining
that it cannot find it.

Here is the error:
Caused by: java.lang.IllegalStateException: The path to the
chromedriver executa
ble must be set by the webdriver.chrome.driver system property; for
more informa
tion, see http://code.google.com/p/selenium/wiki/ChromeDriver. The
latest versio
n can be downloaded from http://code.google.com/p/chromedriver/downloads/list

Here is my json config:

{
"capabilities": [
{
"browserName": "firefox",
"maxInstances": 5,
"version": "3.6",
"seleniumProtocol": "WebDriver",
"platform": "WINDOWS"
},
{
"browserName": "internet explorer",
"maxInstances": 5,
"version": "8",
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver",
"version": "16"
}
],
"configuration": {
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 10,
"port": 5555,
"host": "SG-W7-1",
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hub": "http://sg-server:4444/wd/hub",
"webdriver.chrome.driver": "C:\\Users\\selenium.user\\Desktop\
\chromedriver_win_19.0.1068.0\\chromedriver.exe"
}
}

And here is my driver creation code:
webDriver = new RemoteWebDriver(new Uri(remoteServer), capabilities);

Capabilities in this instance just exists of a browsername, version
and OS.

Hope one you can assist.

Regards

Mike Riley

unread,
May 11, 2012, 11:55:39 AM5/11/12
to seleniu...@googlegroups.com
Try this:
PATH=%PATH%;C:\Users\selenium.user\Desktop\chromedriver_win_19.0.1068.0

No go forth and execute, my son!

Just edit the Environment variables for the system and every program will have this in their PATH automatically, but try it from the command line first.

I also suggest keeping your current Selenium files in a standard directory and not one with a version number, or you will be changing this PATH for every release.  I keep copies in directories with the version number and copy them into my standard location once they have been vetted.

Mike

Richard Bradshaw

unread,
May 11, 2012, 2:15:46 PM5/11/12
to Selenium Users
Thanks for a quick reply mike, I actually got around this by ignoring
the grid instance and going try to a chromeDriver instance.

However is it the case that I can get the selenium node to start the
Chrome driver?
So I don't have to have the location of the driver in my json config
if I can get the PATH to work?

Yes i do the same with the selenium.jar this was merely trying to test
my driver control code, they discovered that chromeDriver doesn't work
like Firefox or IE.

Mike Riley

unread,
May 11, 2012, 5:51:00 PM5/11/12
to seleniu...@googlegroups.com
I don't do anything to run Chrome via RemoteWebDriver other than have it in my PATH.  The Node starts it when I start a session with the Chrome browser (I assume).

Mike

Richard Bradshaw

unread,
May 14, 2012, 5:11:36 AM5/14/12
to seleniu...@googlegroups.com
Just incase this helps anyone, or you are also a numpty.
Turns out on my VM that i need to reboot before the system will read anything new from the PATH.

All sorted now.
Cheers

Krishnan Mahadevan

unread,
May 14, 2012, 5:18:24 AM5/14/12
to seleniu...@googlegroups.com
Richard,
Not necessarily true. Any changes to the PATH environment variable to be reflected within an application (lets say eclipse for eg.,) merely requires the application to be respawned so that it reads the system variables once again.

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 "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/vcTlNZJf1EAJ.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Mike Riley

unread,
May 14, 2012, 12:08:04 PM5/14/12
to seleniu...@googlegroups.com
That is correct.  What you probably saw was that you already had the servers up and running.  If you had shut them down, and started them in a brand new command line window you would have had the new PATH settings.

Mike


On Monday, May 14, 2012 2:18:24 AM UTC-7, Krishnan wrote:
Richard,
Not necessarily true. Any changes to the PATH environment variable to be reflected within an application (lets say eclipse for eg.,) merely requires the application to be respawned so that it reads the system variables once again.

Thanks & Regards
Krishnan Mahadevan

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


On Mon, May 14, 2012 at 2:41 PM, Richard Bradshaw <richard...@gmail.com> wrote:
Just incase this helps anyone, or you are also a numpty.
Turns out on my VM that i need to reboot before the system will read anything new from the PATH.

All sorted now.
Cheers

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/vcTlNZJf1EAJ.

To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

Ashish Thakur

unread,
May 14, 2012, 12:47:51 PM5/14/12
to seleniu...@googlegroups.com
Follow these steps.
1) Go to:

2) Download the chromedriver exe for your OS. Extract the file at certain location.

3) Make sure chrome is installed on your machine

4) Write code like this:

System.setProperty("webdriver.chrome.driver","PATH TO CHROMEDRIVER EXE WHICH YOU DOWNLOADED/EXTRACTED IN STEP 1");
WebDriver driver= new ChromeDriver();
driver.get("http://www.gmail.com");

It works !!

Regards
Ashish
For selenium training visit:


To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/70hwHtFa_MsJ.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Mike Riley

unread,
May 14, 2012, 7:26:06 PM5/14/12
to seleniu...@googlegroups.com
Ashish,

The reason I don't recommend that is that it requires that your test code know about the paths.  If you are dealing with different versions of Windows this might change from version to version, especially between 32-bit and 64-bit versions.  By keeping it as part of the PATH for the system your code can be OS ignorant and work just fine.

Mike

Ashish Thakur

unread,
May 16, 2012, 3:06:52 AM5/16/12
to seleniu...@googlegroups.com
Well thats correct
But at times chrome simply refuses to work on some systems and it becomes very necessary to do it.
I generally keep this path in a property file and we can change the property file in case the env changes.

Regards
Ashish

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/vG3oNp1OzyUJ.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Ben-Mba

unread,
Jun 5, 2012, 10:53:12 AM6/5/12
to Selenium Users
Hi,
You have just to add  -Dwebdriver.chrome.driver=C:\\the\\path\\of the\
\driver\\chromedriver.exe
when you launch the a node,




START java -jar selenium-server-standalone-2.22.0.jar -role node  -hub
http://localhost:4444/grid/register -nodeConfig nodeconfig.json -
Dwebdriver.chrome.driver=C:\\the\\path\\of the\\driver\
\chromedriver.exe

On 11 mai, 10:57, Richard Bradshaw <richardbrads...@gmail.com> wrote:
> Hello Everyone,
>
> I have looked across all posts I still cannot get this to work.
> I have a GRID instance set up on one machine, and have a node
> configured on another.
>
> I have created a json config file for the node, and tried to pass the
> location of the chromedriver in that, however its still complaining
> that it cannot find it.
>
> Here is the error:
> Caused by: java.lang.IllegalStateException: The path to the
> chromedriver executa
> ble must be set by the webdriver.chrome.driver system property; for
> more informa
> tion, seehttp://code.google.com/p/selenium/wiki/ChromeDriver. The
> latest versio
> n can be downloaded fromhttp://code.google.com/p/chromedriver/downloads/list
Reply all
Reply to author
Forward
0 new messages