This project aims to demostrate the use of Selenium webdriver to handle a typical test work flow through an e-commerce website. The project leverages Maven, JUnit and Cucumber in order to develop a hybrid automation framework whilst adopting a POM approach.
This automation frame work aims to satisfy the following business case:
Business case - "A user should be able to successfully search for and add a product to the shopping cart"
This is a first attempt at creating an automation framework in Java and using the tools listed below. The login test requires a manual first step to solve a CAPTCHA. Ebay detects webdriver instances and fires the CAPTCHA. Unfortunately selenium is not designed to solve them.
intellij idea (community edition) - https://www.jetbrains.com/
Maven - handling project builds and dependencies - https://www.jetbrains.com/help/idea/maven-support.html#maven_multi_module
WebDriver (Java bindings) - https://www.selenium.dev/
Junit - unit testing framework - https://junit.org/junit5/
Cucumber business driven development framework - https://cucumber.io/
- Open the chrome browser
- Navigate to the home page at https://www.ebay.com
- Verify the page title
- Verify that the search text box element is present on the page
- Open the chrome browser
- Navigate to the sign in page at https://www.ebay.com/signin/
- Enter a valid user name and password and login to the website
- Verify the users login credentials are valid and the user has been logged into the website
- Open the chrome browser
- Navigate to the home page at https://www.ebay.com
- Click on the "Shop by category" dropdown located to the left of the site search
- Select "cars & trucks" from the available categories
- Select "Mercedes-Benz" in the make dropdown menu
- Select "C63 AMG S" in the model dropdown menu
- Enter "BT1 3NQ" in the zip code text box
- Select "Used" in the condition dropdown menu
- Click on the "Find Vehicle" button
- Verify a user gets returned a list of cars based on search parameters
- Open the chrome browser
- Navigate to the home page at https://www.ebay.com
- Enter "outdoor pizza oven" into the site search text box
- Click on the "Search" button
- Click the first returned result and add it to the shopping cart
- Navigate to the shopping cart at https://cart.payments.ebay.com/
- Verify that the item has been added to the shopping cart
- Open the chrome browser
- Navigate to the sign in page at https://www.ebay.com/signin/
- Enter valid login credentials and login to the website
- Logout of the website
- Verify a user can logout of the website