Selenium Test Automation: How to build testNG base using testNg annotations?

Step 1: Create base test class

  1. Right click on src/main/java folder, select New > Class
  2. Enter class name as BaseTest
  3. Click Finish

Step 2: Write methods using testNG annotation

Add the below code in BaseTest class:

Selenium Test Automation: How to add plugins and dependencies to your Maven project?

Adding plugins and dependencies to your Maven project

Environment:

  • Operating System: 64 bit Windows 8
  • Java Development Kit (JDK): 1.8
  • Integrated development environment(IDE): Eclipse Oxygen Release (4.7.0)