A robust Selenium WebDriver test suite for the CloudQA Automation Practice Form, designed with resilience and maintainability in mind.
This project implements automated end-to-end tests for form interactions on the CloudQA Automation Practice Form. The tests are built using C# and Selenium WebDriver, with a focus on creating stable, maintainable test code that adapts to changes in the web application.
- Resilient Element Location: Tests use label-based selectors that remain stable even when HTML attributes or element positions change
- Automatic Driver Management: Selenium Manager automatically downloads and configures the correct ChromeDriver version
- Comprehensive Coverage: Tests validate text inputs, radio buttons, and dropdown selections
- Clean Architecture: Well-structured helper methods promote code reuse and maintainability
- .NET 10.0 SDK or later
- Google Chrome browser installed
- Internet connection (for Selenium Manager to download ChromeDriver)
# Restore NuGet packages
dotnet restore
# Build the project
dotnet build# Run all tests
dotnet test
# Run a specific test
dotnet test --filter "FullyQualifiedName~TestFirstNameField"
# Run with detailed output
dotnet test --logger "console;verbosity=detailed"| Test | Description |
|---|---|
TestFirstNameField |
Validates text input functionality for the First Name field |
TestGenderField |
Tests radio button selection for gender options |
TestStateDropdown |
Verifies dropdown selection for state/country options |
.
├── AutomationPracticeFormTests.cs # Main test class
├── CloudQATests.csproj # Project configuration
├── README.md # This file
└── PROJECT_DOCUMENTATION.md # Detailed technical documentation
- .NET 10.0: Target framework
- NUnit 3.14.0: Testing framework
- Selenium WebDriver 4.15.0: Browser automation
- Selenium Manager: Automatic driver management (built into Selenium 4.6+)
The test suite is designed with the following principles:
- Stability Over Speed: Tests prioritize reliability and maintainability
- Label-Based Selection: Elements are located by their semantic labels rather than fragile IDs or classes
- Graceful Degradation: Multiple fallback strategies ensure tests continue working even when page structure changes
- Separation of Concerns: Helper methods encapsulate element location logic, keeping tests clean and readable
When adding new tests:
- Use the existing helper methods (
FindInputByLabel,FindRadioByLabel,FindSelectByLabel) - Follow the established naming conventions
- Ensure tests are independent and can run in any order
- Update documentation when adding new functionality