This project contains an automated test scenario for the SauceDemo website using Selenium and Python.
- Python 3.x installed
- Selenium WebDriver library installed (
pip install selenium
) - Chrome WebDriver executable installed and in the system PATH
- Clone the repository to your local machine.
- Install the required dependencies by running the following command:
- Install the required dependencies: pip install -r requirements.txt
The test scenario performs the following steps:
- Create a browser instance and set up the test environment.
- Open the login page and verify the Swag Labs logo.
- Login with valid credentials.
- Open the menu to access the Logout button and verify its presence.
- Verify that the inventory page is displayed.
- Navigate to the product detail page and verify the product name.
- Add the item to the cart and verify the "Remove" button.
- Navigate to the shopping cart page and verify the item in the cart.
- Continue with the checkout process and verify the checkout page.
- Enter required shipping and payment information.
- Proceed to the confirmation page and verify the item in the overview.
- Logout from the website.
- Tear down the test environment.
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.