Before running any of the tests, please make sure you have the correct versions. you could check them all down below. I also added an extra step checking the cart if the product is in there once we click it. Thank you, Atila Kilicarslan.
This project automates a specific user journey:
- Navigating to the login page.
- Logging in using credentials stored in a configuration file.
- Dynamically identifying and adding the most expensive item to the cart.
- Verifying the item is successfully added to the basket.
- Java 17+
- Selenium WebDriver (UI Automation)
- Cucumber / TestNG (BDD Framework)
- Maven (Project Management)
- WebDriverManager (Automatic Driver Management)
- Ensure you have Maven installed (
mvn -version). - Google Chrome must be installed.
Open your terminal in the project root and run:
mvn test "-Dtest=runners.RunCucumberTest"