top of page

Automation with Selenium - Python to Test Sauce Demo shopping app

 

The tests replicate user flows for:

1. Logging in with an existing account.

2. Adding items to cart.

3. Removing items from cart.

4. Checking out items in cart.

5. Verifying order. 

​

​Test Plan

Objectives

  • Ensure End-2-End user workflows work as expected. 

  • Enable consistent and repeatable test execution across environments.

  • Validate Order after checking out. 

​

 Scope of Testing​

  • Login/Logout

  • Product search/filtering

  • Adding/removing items to/from cart

  • Checkout process

  • Placing an order

​

Environment Setup

  • Clone the repository.

  • Create virtual environment & install dependencies:

python -m venv venv

source venv/bin/activate

pip install -r requirements.txt

  • Dependencies:

selenium

pytest

webdriver-manager

pytest-html (for reporting)

python-dotenv (for env configs)

  • Folder Structure

  • bash

  • CopyEdit

  • /tests ├── test_login.py ├── test_cart.py /pages ├── login_page.py ├── product_page.py /config ├── settings.py /utils ├── base_test.py ├── helpers.py

  • ​

​

Test Cases & Scenarios

​​​​​​​​

​

​

​

​

​

​

​

​​

​

Screenshot 2025-07-31 at 5.47.06 PM.png
Screenshot 2025-07-31 at 5.47.06 PM.png
Screenshot 2025-07-31 at 5.47.06 PM.png
Screenshot 2025-07-31 at 5.47.06 PM.png
bottom of page