WebDriver implementation using Selenium 3.0 in a Maven project

Dependencies to add to your pom.xml file for WebDriver implementation using Selenium 3.0
When using DefaultSelenium in your Maven project, use the following dependency 
 <dependency>
     <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-java</artifactId>
     <version>3.0.1</version>
 </dependency>

Note that in the above code the DefaultSelenium is dependent on selenium-java artifact, which has a lot of transitive dependencies.

When using FirefoxDriver in your Maven project, use the following dependency
 <dependency>
     <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-firefox-driver</artifactId>
     <version>3.0.1</version>
 </dependency>  

To embed the Selenium server into your project, add the following dependency
 <dependency>
     <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-server</artifactId>
     <version>3.0.1</version>
 </dependency>

You may also use selenium-server-standalone.jar file. Note that you need to start selenium server even if you are using DefaultSelenium or the remoteWebDriver implementation.

Central maven directory has all the Selenium Maven artifacts - click here

No comments:

Post a Comment