https://github.com/stefruseva88/selenium-pom-swag
Page Object Model (POM) testing pattern in Selenium WebDriver using C#
https://github.com/stefruseva88/selenium-pom-swag
nunit-tests selenium-chrome selenium-csharp selenium-pom
Last synced: 6 months ago
JSON representation
Page Object Model (POM) testing pattern in Selenium WebDriver using C#
- Host: GitHub
- URL: https://github.com/stefruseva88/selenium-pom-swag
- Owner: StefRuseva88
- License: mit
- Created: 2024-09-09T13:04:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-28T17:25:45.000Z (over 1 year ago)
- Last Synced: 2025-04-10T20:29:45.010Z (over 1 year ago)
- Topics: nunit-tests, selenium-chrome, selenium-csharp, selenium-pom
- Language: C#
- Homepage:
- Size: 368 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Selenium WebDriver POM with C# – Swag Labs Automation
[](https://learn.microsoft.com/en-us/dotnet/csharp/)
[](https://dotnet.microsoft.com/)
[](https://www.selenium.dev/)
### This is a test project for Front-End Test Automation July 2024 Course @ SoftUni
This repository provides a detailed guide to implementing the Page Object Model (POM) pattern in Selenium WebDriver using C#. The goal is to automate key aspects of a web application using POM, focusing on the Swag Labs demo e-commerce platform.
## Application Overview
**Swag Labs** is a demo e-commerce platform built to allow QA engineers to practice automation testing. It features:
- A **Login page** to authenticate users.
- An **Inventory page** that displays available products.
- A **Shopping cart** where users can manage selected products.
- A **Checkout process** to complete purchases.
## Objective
The objective of this project is to demonstrate how to:
- Implement the **Page Object Model (POM)** in a structured and scalable way.
- Automate the complete shopping process from login to checkout using **Selenium WebDriver**.
- Manage complex user interactions.
## Project Structure
- **Pages**: This folder contains the Page Object classes representing various pages of the Swag Labs application.
- `BasePage.cs`: A base class containing common web driver methods and elements shared across pages.
- `LoginPage.cs`: Represents the login page and contains methods for logging into the application.
- `InventoryPage.cs`: Represents the inventory/product page, including methods for selecting products.
- `CartPage.cs`: Represents the shopping cart and contains methods for managing the cart.
- `CheckoutPage.cs`: Represents the checkout process, handling form submissions.
- `HiddenMenuPage.cs`: Handles the hidden menu (if applicable).
- **Tests**: This folder contains test classes for different functionalities in the application.
- `BaseTest.cs`: A base test class that handles setup and teardown of the WebDriver and other shared configurations.
- `LoginTests.cs`: Tests for validating the login functionality.
- `InventoryTests.cs`: Tests for product selection on the inventory page.
- `CartTests.cs`: Tests for managing the shopping cart.
- `CheckoutTests.cs`: Tests for validating the checkout process.
## License
This project is licensed under the [MIT License](LICENSE). See the [LICENSE](LICENSE) file for details.
## Contact
For any questions or suggestions, please reach out to the course instructor or open an issue in the repository.
---
### Happy Testing! 🚀