Does Chrome driver still support custom chrome install location?

281 views
Skip to first unread message

bp

unread,
Jun 15, 2011, 10:01:23 AM6/15/11
to webdriver
Is webdriver.chrome.bin deprecated as of RC2?

webdriver.chrome.driver seems to be just the location of the per
platform exectuable, but the actual install of Chrome could be in a
custom location. Can we still specify that location using
webdriver.chrome.bin, or is that irrelevant now?

The documentation says chrome is expected to be installed in a
standard location

http://code.google.com/p/selenium/wiki/ChromeDriver#Requirements

Does this meant the ability to customize chrome install location is
now lost?

Jason Leyba

unread,
Jun 15, 2011, 11:13:19 AM6/15/11
to webd...@googlegroups.com
This can be done using DesiredCapabilities.

DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability("chrome.bin", "/full/path/to/chrome.exe");
WebDriver driver = new ChromeDriver(cap);



--
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.


Pawel Marek

unread,
Jun 15, 2011, 11:43:35 AM6/15/11
to webdriver
Hi Jason,

I have similar problem as bp - I can't use Chrome in my tests, as a
result I have:

SetUp : OpenQA.Selenium.WebDriverException : The file C:\Users\pawelm
\Documents\Visual Studio 2008\Projects\SkyscannerRC\SkyscannerRC\bin
\Debug\chromedriver.exe does not exist.

I've also tried your solution, but it seems to me that there is a
problem, because in third line we cannot add parameter:

DesiredCapabilities cap = DesiredCapabilities.Chrome();
cap.SetCapability("chrome.bin", "C:\\Users\\pawelm\\AppData\\Local\
\Google\\Chrome\\Application");

IWebDriver driverd = new ChromeDriver(cap); <- we can;t add here
parameter

So there is a possibility to use chrome with webdriver RC2?

Cheers,
Pawel

bp

unread,
Jun 22, 2011, 2:56:59 PM6/22/11
to webdriver
I tried this and it did not work, it continues to launch chrome from
the standard location even though I pass it my custom chrome exe
location. It almost looks like the executable is controlling which
file to launch, and explorin the code base I don't see how the
chrome.bin value is being used if at all.

Jim Evans

unread,
Jun 22, 2011, 5:28:37 PM6/22/11
to webdriver
Nope, it's an oversight in the .NET bindings that the ChromeDriver
doesn't have a constructor overload that takes an ICapabilities object
as a parameter. This has just been corrected, but the fix is not in
2.0rc3.

--Jim
> > >http://groups.google.com/group/webdriver?hl=en.- Hide quoted text -
>
> - Show quoted text -

bp

unread,
Jul 7, 2011, 1:26:27 PM7/7/11
to webd...@googlegroups.com
Jim, does this mean this bug is only on Windows (since you mentioned .NET) bindings. I have yet to try this on a Mac, but will the custom location work on Mac? that would let me test stable and canary at the same time

Jim Evans

unread,
Jul 7, 2011, 4:24:13 PM7/7/11
to webdriver
I've no idea. The bug (which was fixed for 2.0 final) I'm talking
about is specifically in the .NET language bindings. That bug is that
there was no constructor overload of the ChromeDriver class that
allowed you to pass in a custom capabilities object. If the custom
path to Chrome is not working and you're using the Java bindings to
work on OS X, then I'd have to think maybe the problem is somewhere in
the ChromeDriver executable.

Ravindra Yadav

unread,
Jul 17, 2014, 3:33:04 AM7/17/14
to webd...@googlegroups.com
You can use option to set binary like:

options.setBinary(new File(path to your custom chrome installed location)


thanks
Reply all
Reply to author
Forward
0 new messages