Skip to content

VincentVusi/SauceDemoWebsiteTesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SauceDemoWebsiteTesting

Selenium 4 WebDriver Example for saucedemo.com

Overview

This repository contains a simple example of using Selenium WebDriver to automate interactions with a web application. The code is organized into several classes, each representing a different page or step in a fictional e-commerce checkout process.

Project Structure

LoginPage: Handles interactions with the login page, providing methods to enter credentials and log in. InventoryPage: Represents the inventory page, offering methods for interacting with various elements on the page, such as adding items to the cart or navigating to different sections. CartPage: Represents the shopping cart page, providing methods to remove items from the cart and proceed to checkout.

CheckoutStepOnePage: Represents the first step of the checkout process, allowing users to enter their information.

CheckoutStepTwoPage: Represents the second step of the checkout process, providing a method to complete the checkout. Prerequisites

Before running the code, make sure you have the following installed:

Java Development Kit (JDK)

Selenium 4

latest version of TestNG as of 21 December 2023

Clone this repository:

BASH :

Copy git clone https://github.com/VincentVusi/SauceDemoWebsiteTesting.git

Navigate to the project directory:

BASH :

Copy cd SauceDemoWebsiteTesting

Open the project in your preferred Java IDE.

Run the main class or individual test classes to execute the Selenium WebDriver automation.

Usage

Feel free to use, modify, and extend this example for your own Selenium WebDriver projects. Each class has methods for specific interactions with web elements, making it easy to integrate into your testing framework.

Screenshort of the website used in this example https://www.saucedemo.com/

image

Java docs

Find java docs for the project on a folder written java docs
Screenshot 2023-12-21 120433
License

This project is licensed under the MIT License.