Share

Selenium, Cucumber, JUnit, TestNG dependencies for Selenium project.

Author: neptune | 11th-Dec-2021 | views: 130
#Selenium #Testing #Cucumber #Projects

You are here then you definitely know what is pom.xml file, if not then POM stands for Page Object Model. When we create or convert Selenium project into Maven project then pom.xml file added in project root directory. POM maintain the dependencies of  Selenium, Cucumber, JUnit, TestNG etc. If we need to update, add, delete dependencies then we can easily do that with help of pomo.xml file.

All you need to do is copy and paste the dependencies in pom.xml file in between dependencies tag :

<dependencies>

// add selenium, cucumber any other dependencies

</dependencies>

  • Selenium Dependencies

        <!-- These are the selenium-webdriver dependencies -->

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-java</artifactId>

<version>3.5.2</version>

</dependency>

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-server</artifactId>

<version>3.5.2</version>

</dependency>

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-chrome-driver</artifactId>

<version>3.5.2</version>

</dependency>

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-remote-driver</artifactId>

<version>3.5.2</version>

</dependency>

        <!-- selenium-webdriver dependencies end -->

  • Cucumber Dependencies

<!-- These are the cucumber dependencies -->

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-java</artifactId>

<version>1.2.5</version>

</dependency>

<!-- cucumber dependencies end -->

  • Cucumber-JUnit Dependencies

          <!-- These are the cucumber-junit dependencies -->

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-junit</artifactId>

<version>1.2.5</version>

</dependency>

          <!-- cucumber-junit dependencies end -->


  • JUnit Dependencies

<!-- These are the junit dependencies -->

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>4.12</version>

</dependency>

         <!-- These are the junit dependencies -->

  • Cucumber-TestNG Dependencies

<!-- These are the Cucumber-TestNG dependencies -->

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-testng</artifactId>

<version>1.2.3</version>

</dependency>

<!-- Cucumber-TestNG dependencies end -->

Above all dependencies are basic dependencies for Selenium Maven Project using TestNG as a reporting tool. You can add more dependencies the same way you add above dependencies.

Complete pom.xml file



Thanks for Reading !





Related Blogs
Automate Ticket booking in SpiceJet from Delhi to Bengaluru using Selenium WebDriver and Cucumber BDD.
Author: neptune | 10th-Sep-2021 | views: 666
#Selenium
We are going to automate a ticket booking using Selenium WebDriver and Cucumber BDD...
Top 10 Selenium Interview Questions with answers (2021).
Author: neptune | 05th-Jun-2021 | views: 267
#Selenium
In this article I will cover top 10 Selenium interview questions...
Mostly asked Cucumber interview questions in selenium automation interviews.
Author: neptune | 16th-Dec-2021 | views: 137
#Selenium #Testing #Cucumber
We are going to explore widely asked Cucumber interview questions in selenium automation interviews...
View More