Donate to Selenium

with PayPal
through sponsorship

You can sponsor the selenium project if you'd like some public recognition of your generous contribution.

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>2.41.0</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:

Selenium Maven 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>2.41.0</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>2.41.0</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-2.5 artifact, which you should exclude, if your project will be run inside a web application container.

Third Party Browser Drivers NOT SUPPORTED/DEVELOPED by seleniumhq

Opera Driver

    <dependency>
        <groupId>com.opera</groupId>
        <artifactId>operadriver</artifactId>
        <version>1.5</version>
    </dependency>  
  

PhantomJSDriver (GhostDriver)

    <dependency>
        <groupId>com.github.detro.ghostdriver</groupId>
        <artifactId>phantomjsdriver</artifactId>
        <version>1.0.4</version>
    </dependency>