Maven Information

If you're using Maven, you will find all Selenium Maven artifacts directly in the central Maven repository here: http://repo1.maven.org/maven2/org/seleniumhq/selenium/

In order to start using DefaultSelenium or one of the new WebDriver implementations in your Maven project, just add the following dependency to your pom.xml:
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
    </dependency>
Note: Before version 2.0rc3 the artifact was named selenium-remote-control.

To get an overview of the different Selenium Maven artifacts, click on the thumbnail below to open a diagram, which shows the dependencies between the Selenium Maven artifacts as well as the most important classes/interfaces in those artifacts:

If you know that you will only use a certain WebDriver implementation, e.g. the FirefoxDriver, you don't need to depend on the selenium-java artifact (which has a lot of transitive dependencies). Instead you can just add the dependency on the artifact you need, e.g.
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>3.141.59</version>
    </dependency>
Starting with 2.53.0 you need to explicitly include HtmlUnitDriver as a dependency to include it. Version number of the driver is now tracking HtmlUnit itself.
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>htmlunit-driver</artifactId>
        <version>2.33.2</version>
    </dependency>
If you are using DefaultSelenium (or the RemoteWebDriver implementation), you still need to start a Selenium server. The best way is to download the selenium-server-standalone.jar from the Selenium Downloads page and just use it. Furthermore you can also embed the Selenium server into your own project, if you add the following dependency to your pom.xml:
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>3.141.59</version>
    </dependency>

Now you can create a SeleniumServer instance yourself and start it.

Note: Be aware, that the selenium-server artifact has a dependency to the servlet-api-3.1.0 artifact, which you should exclude, if your project will be run inside a web application container.

Selenium Level Sponsors

Support the Selenium Project

Want to support the Selenium project? Learn more or view the full list of sponsors.

All rights reserved, Software Freedom Conservancy