rathorsunpreet / testng

Selenium based cross-browser UI checks for Website using TestNG testing framework and Maven.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selenium - TestNG Project

Selenium project to perform cross-browser test of DOM Elements of the site Art of Testing using TestNG and Maven.

Requirements

This project requires the following to execute:

  • Eclipse (with TestNG Plugin)
  • Maven 3.9.5
  • Java 21

Installation

To install the project, perform the following steps:

  1. Go to Repository.
  2. Click on Code -> Download as Zip.
  3. Unzip the file.
  4. Open Eclipse.
  5. Click on File -> Import -> Existing Projects into Workspace.
  6. In the new Dialog Box, select "Select Root Directory".
  7. Click on Browse and set the root as the unzipped directory.
  8. Make sure that the project is selected under "Projects" list.
  9. Click Finish.

Usage

To execute the project, perform the following steps:

  1. Open Eclipse and make sure the project is active.
  2. Click on Run -> Run Configurations... .
  3. Select TestNG and then either right click and select "New Configuration" or click on the button "New Launch Configuration" located above the search bar.
  4. On the newly opened dialog on the right-hand side, give the config a "Name".
  5. Under the "Test" tab, select the "Project" using the "Browse" button.
  6. Under "Run...", select "Suite" and set it to "TestNGSuite.xml" provided with the project using "Browse".
  7. Click Apply.
  8. Click Run.

To execute the project anytime, just go to Run -> Run Configurations... -> (Your new Test Config) -> Run.

Videos

Missing Features

Drag and Drop Test is extremely hard to implement on Gecko (Mozilla Firefox) & Chrome Drivers, as per the following posts and several others like it:

There is however a roundabout solution, by using an external javascript file druska/native_js_drag_and_drop_helper.js . This is however not a reliable solution and may need to be modified based on framework used to build the site.

Another solution is to use the Selenium IDE addon/plugin for the web browser for these kind of tests.

License

MIT

About

Selenium based cross-browser UI checks for Website using TestNG testing framework and Maven.

License:MIT License


Languages

Language:Java 100.0%