Is maven dependency available for new chromedriver.exe ?

8,577 views
Skip to first unread message

Pavithra

unread,
Jun 17, 2011, 8:39:18 AM6/17/11
to webdriver, simon.m...@gmail.com
Hi,
I switched to selenium 2.0rc2 to work with chrome and it was giving
error that webdriver.chrome.driver is not set to chromedriver.exe,
hence i download the exe and set the system property for
webdriver.chrome.driver and it worked.
However for maven, how we have to go?
is there a maven dependency available for new chromedriver.exe ?

Thanks,
Pavithra

Luke Inman-Semerau

unread,
Jun 17, 2011, 10:39:55 AM6/17/11
to webd...@googlegroups.com
Same thing for maven. The maven dependencies don't include the
executable for IE or Firefox either, why would chrome be any different?

That being said, Michael Tamm (maintainer of the maven stuff for
selenium) just floated the idea the other day to include chrome in a
jar. But I don't expect that for rc3. Plus I think this all becomes
moot when the general release becomes version 12 for chrome.

-Luke

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

Pavithra

unread,
Jun 17, 2011, 1:17:41 PM6/17/11
to webdriver

so, in this case how we can work n chrome browser using maven?
do we need to put the exe in some path and set the propperty here
also? as we do for normal java project?

pavithra

On Jun 17, 7:39 pm, Luke Inman-Semerau <luke.seme...@gmail.com> wrote:
> Same thing for maven. The maven dependencies don't include the  
> executable for IE or Firefox either, why would chrome be any different?
>
> That being said, Michael Tamm (maintainer of the maven stuff for  
> selenium) just floated the idea the other day to include chrome in a  
> jar. But I don't expect that for rc3. Plus I think this all becomes  
> moot when the general release becomes version 12 for chrome.
>
> -Luke
>

Luke Inman-Semerau

unread,
Jun 17, 2011, 2:37:56 PM6/17/11
to webd...@googlegroups.com
It's the same whether you use maven or not:

Simon Stewart

unread,
Jun 18, 2011, 3:56:12 PM6/18/11
to webd...@googlegroups.com
We'd include the chromedriver.exe in the jar, but it'd be massive.
There are potentially 32 and 64 bit versions required for OS X, Linux
and Windows.

Simon

Pavithra

unread,
Jun 20, 2011, 9:11:44 AM6/20/11
to webd...@googlegroups.com
How to go about with Mac ? - where or how to get equivalent chromedriver.dmg for mac ?
Sorry I am new to mac testing !!

Jason Leyba

unread,
Jun 20, 2011, 8:06:18 PM6/20/11
to webd...@googlegroups.com
You can find the available versions on our downloads page:



On Mon, Jun 20, 2011 at 6:11 AM, Pavithra <pav...@gmail.com> wrote:
How to go about with Mac ? - where or how to get equivalent chromedriver.dmg for mac ?
Sorry I am new to mac testing !!

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

Pavithra

unread,
Jun 21, 2011, 5:24:49 AM6/21/11
to webdriver
Thanks !!
I used the chromedriver for mac but its failing to launch because of
the error:
ERROR:automation_json_requests.cc(42)] JSON request failed: GetTabIds
with error: no browser object
/b/build/slave/chrome-official-mac/build/src/chrome/test/automation/
proxy_launcher.cc:305: Failure

bug reference : http://code.google.com/p/chromium/issues/detail?id=85863

Is there any other workaround exist now to work on mac?

Thanks,
Pavithra

Jakub Siberski

unread,
Feb 6, 2012, 9:43:19 AM2/6/12
to webd...@googlegroups.com
It would be big, but without it you put this burden on users. While at home for one machine this is not so much, then for people that use this professionally it is a big problem:
 - setting up driver on number of different machines is out of the question (Grid anyone? different machines, different OS'es different browsers)
 - using scm repo is not the best also (depending on setup various problems with network, repo size, external scripts for managing both repo/driver/paths)
 - using nas gives that same problems as scm (except size issues)
 - use service like saucelabs (if you can pay, if your management will trust with exposing product to third party - which is not always the case for products before public release)

So it basically in most cases leads manegers/developers to 
a) ' This setup is too much, we want something simpler (or nothing) '
b) ' This is to fragile/brittle we need something more trustworthy (or nothing)'
c) mixture of two above and some other excuses for not caring / not doing automated test on user level.

I will in my company manually download new versions, deploy them to company nexus, create proper dependencies between the projects for windows/mac/linux 32/64 but this is a lot of work you are putting on me. Will other users in other companies do that? Or will it be always too much and user level test will remain not applicable in 'real projects' ?

Simon Stewart

unread,
Feb 6, 2012, 9:51:01 AM2/6/12
to webd...@googlegroups.com
Hi,

If consistency between machines is important, have you considered
using something like puppet, chef or whatever the Windows equivalent
is? I've had a lot of good experiences with checking binaries like
this into a "tools" project stored under source control, which is
another approach you might think about. I also know that the chrome
team would love it if more people were using the chromedriver.

I know that's not ideal, but integrating the chromedriver update into
your normal machine configs and update procedures is a relatively easy
way of going about keeping up to date (particularly if you have a
corp-controlled chrome version too)

FWIW, the chromedriver binary is vendor supported. I know from
conversations with the guys working on it that there's been a real
effort put into making updates easier, but so far without much luck.
If it's a feature that's important to you, then the correct place to
raise a feature request is with the chromium project.

Regards,

Simon

> --
> You received this message because you are subscribed to the Google Groups
> "webdriver" group.

> To view this discussion on the web visit

> https://groups.google.com/d/msg/webdriver/-/WsvmG7mHSBMJ.

Jakub Siberski

unread,
Feb 6, 2012, 5:57:11 PM2/6/12
to webd...@googlegroups.com
Well we do have puppet which we use for linux machines setup. This is even much better approach than maven in that case. With windows we had some issues, so we have them partially in puppet, rest through bat/cmd scripts and nas/git 'storage'. 
The only thing is I know a bit about mavn, not so much about puppet itself. But since I need solution for (maven) Java project, then maven integration would be ideal. Maven/Puppet integration... will be fun day tomorrow at work. Puppet guy will be so happy when I come with this to him.

Anyways I agree that putting this into maven central (4 binaries per version) would make repo GROW. Yet I don't see easiest way to manage that dependency in maven project.
--
Pozdrawiam
Jakub Siberski

Boni García

unread,
Apr 8, 2015, 1:39:25 PM4/8/15
to webd...@googlegroups.com
There is an open source utility called "webdrivermanager" to handle WebDriver binaries (chromedriver, operadriver, IEDriverServer) in Java. This library downloads the latest version of the WebDriver binary you need, store it in the Maven local repository (.m2/repository), and export the proper Java system variable (webdriver.chrome.driver, webdriver.opera.driver, webdriver.ie.driver): 

https://github.com/bonigarcia/webdrivermanager

Simply adding this dependency to your Maven project: 

<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>1.0.0</version>
</dependency>

... you can invoke the following methods and webdrivermanager does to the trick for you: 

ChromeDriverManager.setup(); 
InternetExplorerDriverManager.setup(); 
OperaDriverManager.setup(); 

Then you can create your WebDriver object (ChromeDriver, OperaDriver, InternetExplorerDriver) to carry out automated web browsing.

Krishnan Mahadevan

unread,
Apr 9, 2015, 3:59:46 AM4/9/15
to webdriver
Boni,

Thanks for sharing your work on this. 
We in SeLion (http://selion.io) pretty much operate only with the RemoteWebDriver mode and for executions that are targetted at the local machines (which people normally resort to when developing tests wherein they would like to see how their test execution is happening) we spin off a Grid and Node via code, take care of wiring the node to the Hub and then just point the RemoteWebDriver to start executing against this programmatically spun off Grid.

So for people who are predominantly operating on this model, how does your library fair around these areas ?

For remote executions we in SeLion (http://selion.io) went one step ahead and built some customizations around the Grid wherein a person who is maintaining the Grid infrastructure now has the opportunity to basically provide the download URLs for various artifacts such as "Which selenium version to use", "Which version of ChromeDriver, IEDriverServer" to use and our custom grid [ We call it the SeLion Self Healing Grid ] to delegate the responsibility of downloading these artifacts at the node level as and when a node has completed running all the current tests, and then it respawns itself with the new artifacts.



 




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 Scribbings @ http://rationaleemotions.wordpress.com/

To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.

To post to this group, send email to webd...@googlegroups.com.

Boni García

unread,
Apr 10, 2015, 8:33:23 PM4/10/15
to webd...@googlegroups.com
Hi Krishnan,

I think WebDriverManager can be also useful for Selenium Grid. The typical way of registering nodes in a grid is by executing something like this:

java -jar selenium-server-standalone-2.45.0.jar -role node -port <node-port> -hub http://<hub-address>:<hub-port>/grid/register -browser browserName=<browser-name>, version=<browser-version>,maxInstances=<max-instances>,platform=<platform> -maxSession <max-sessions> -timeout <seconds>


If the node you are registering is (for example) Chrome, you must provide the path of the chromedriver binary as follows:

java -jar selenium-server-standalone-2.45.0.jar -role node -port <node-port> -hub http://<hub-address>:<hub-port>/grid/register -browser browserName=<browser-name>, version=<browser-version>,maxInstances=<max-instances>,platform=<platform> -maxSession <max-sessions> -Dwebdriver.chrome.driver=${remoteChromeDriver} -timeout <seconds>


In order to use WebDriverManager to download and export the chromedriver binary, you should register your node programmatically. A running example is the following (hub and node both local, platform Linux, browser Chrome):

import io.github.bonigarcia.wdm.ChromeDriverManager;

import java.util.HashMap;
import java.util.Map;

import org.openqa.grid.common.GridRole;
import org.openqa.grid.common.RegistrationRequest;
import org.openqa.grid.internal.utils.SelfRegisteringRemote;
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;

public class StartNode {

public static void main(String[] args) throws Exception {

ChromeDriverManager.setup();

String hubAddress = "127.0.0.1";
int hubPort = 4444;
String nodeAddress = "127.0.0.1";
int nodePort = 5555;

RegistrationRequest req = new RegistrationRequest();

DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PLATFORM, Platform.LINUX);
cap.setCapability(CapabilityType.BROWSER_NAME, BrowserType.CHROME);
req.addDesiredCapability(cap);
req.setRole(GridRole.NODE);

Map<String, Object> nodeConfiguration = new HashMap<String, Object>();
nodeConfiguration.put(RegistrationRequest.AUTO_REGISTER, true);
nodeConfiguration.put(RegistrationRequest.HUB_HOST, hubAddress);
nodeConfiguration.put(RegistrationRequest.HUB_PORT, hubPort);
nodeConfiguration.put(RegistrationRequest.PORT, nodePort);
nodeConfiguration.put(RegistrationRequest.REMOTE_HOST, "http://"
+ nodeAddress + ":" + nodePort);
nodeConfiguration.put(RegistrationRequest.PROXY_CLASS,
"org.openqa.grid.selenium.proxy.DefaultRemoteProxy");
nodeConfiguration.put(RegistrationRequest.MAX_SESSION, 1);
nodeConfiguration.put(RegistrationRequest.MAX_INSTANCES, 1);
req.setConfiguration(nodeConfiguration);

SelfRegisteringRemote remote = new SelfRegisteringRemote(req);
remote.startRemoteServer();
remote.startRegistrationProcess();
}
}

You also have the two choices for running the hub: i) by command line:

java -jar selenium-server-standalone-2.45.0.jar -role hubport 4444


ii) by Java code:

import org.openqa.grid.internal.utils.GridHubConfiguration;
import org.openqa.grid.web.Hub;

public class StartHub {

public static void main(String[] args) throws Exception {
String hubAddress = "127.0.0.1";
int hubPort = 4444;
int timeout = 60; // seconds

GridHubConfiguration config = new GridHubConfiguration();
config.setHost(hubAddress);
config.setPort(hubPort);
config.setTimeout(timeout);

Hub hub = new Hub(config);
hub.start();
}
}

Kind regards,
Boni

Mark Collin

unread,
Apr 11, 2015, 4:59:38 AM4/11/15
to webd...@googlegroups.com
Sounds very similar to my own maven plugin which has been around for about for 2.5 years now :)


This currently downloads the binaries you specify for you and then sets a maven property that maven can pass around. This property can be set as a system property by maven so that the binaries are just picked up when you run your tests.

There is an example project here showing it in action (it also has some code to check if system properties are set, and if not have a look at environmental properties for people who have installed a binary and set and env variable on their machine)

Boni García

unread,
Apr 11, 2015, 5:40:10 AM4/11/15
to webd...@googlegroups.com
Yes, I know that project. In fact I forked that project but it wasn't exactly what I needed, and so I decided to create WebDriverManager.

Indeed the aim of both projects is the same, but the difference is selenium-standalone-server-plugin downloads binaries in the Maven lifecyle, and WebDriverManager don't. If you use selenium-standalone-server-plugin and then want to use Selenium from JUnit tests, these tests should be run with Maven (mvn test ...). Or at least execute once selenium-standalone-server-plugin and the export the binary path in your test.

Now, what if you don't want to run your tests with Maven? For example, just running your JUnit directly, or using Gradle instead. Here WebDriverManager is different since it is not a Maven plugin but an external library that performs the jobs.

Anyway good job with selenium-standalone-server-plugin.

--
You received this message because you are subscribed to a topic in the Google Groups "webdriver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webdriver/nmdZIJzMYhc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webdriver+...@googlegroups.com.

Mark Collin

unread,
Apr 11, 2015, 8:48:32 AM4/11/15
to webd...@googlegroups.com
What I have is very definitely focused on Maven.

One thing you are missing, which you may want to add, is support for phantomjs to enable people to get headless tests running with ghost driver set up quickly.

More solutions making it easy to use Selenium without added downloads are always a good thing IMHO.

VAHID MAHAMAD KHOCHIKAR

unread,
Dec 11, 2015, 6:36:55 PM12/11/15
to webdriver
Hey Boni,

That's awesome job you did...
But why you not consider FirefoxDriver  ??

Krishnan Mahadevan

unread,
Dec 11, 2015, 9:35:51 PM12/11/15
to webdriver
Firefox does not need a seperate binary like IE or Chrome to work no ?

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 Scribbings @ http://rationaleemotions.wordpress.com/

_____________________________
From: VAHID MAHAMAD KHOCHIKAR <vahid....@gmail.com>
Sent: Saturday, December 12, 2015 05:06
Subject: Re: [webdriver] Is maven dependency available for new chromedriver.exe ?
To: webdriver <webd...@googlegroups.com>
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.

Boni García

unread,
Dec 12, 2015, 4:57:17 AM12/12/15
to webd...@googlegroups.com
Indeed, as Krishnad said, Firefox does not need any binary to be handled by Selenium WebDriver.

--
You received this message because you are subscribed to a topic in the Google Groups "webdriver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webdriver/nmdZIJzMYhc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webdriver+...@googlegroups.com.

To post to this group, send email to webd...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages