Skip to content

This repository contains a Python script for automating a test scenario on the Sauce Labs Demo website using Selenium WebDriver. The test scenario performs various actions such as logging in, navigating through different pages, adding items to the cart, and completing the checkout process.

Notifications You must be signed in to change notification settings

radman-s/Automated_Functional_Testing_for_Saucedemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SauceDemo Test

This project contains an automated test scenario for the SauceDemo website using Selenium and Python.

Prerequisites

  • Python 3.x installed
  • Selenium WebDriver library installed (pip install selenium)
  • Chrome WebDriver executable installed and in the system PATH

Setup

  1. Clone the repository to your local machine.
  2. Install the required dependencies by running the following command:
  3. Install the required dependencies: pip install -r requirements.txt

Test Scenario

The test scenario performs the following steps:

  1. Create a browser instance and set up the test environment.
  2. Open the login page and verify the Swag Labs logo.
  3. Login with valid credentials.
  4. Open the menu to access the Logout button and verify its presence.
  5. Verify that the inventory page is displayed.
  6. Navigate to the product detail page and verify the product name.
  7. Add the item to the cart and verify the "Remove" button.
  8. Navigate to the shopping cart page and verify the item in the cart.
  9. Continue with the checkout process and verify the checkout page.
  10. Enter required shipping and payment information.
  11. Proceed to the confirmation page and verify the item in the overview.
  12. Logout from the website.
  13. Tear down the test environment.

Running the Test

python saucedemo_test.py

  • The test will be executed with the provided test data (username and password). If the test passes, the message "test passed" will be displayed.

About

This repository contains a Python script for automating a test scenario on the Sauce Labs Demo website using Selenium WebDriver. The test scenario performs various actions such as logging in, navigating through different pages, adding items to the cart, and completing the checkout process.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages