Skip to content

mtdias/selenium-exercises-csharp

Repository files navigation

Selenium-Exercises-Csharp

Selenium Learning Repository

Overview

This repository is dedicated to learning and experimenting with Selenium WebDriver in C#. It contains various test scripts that demonstrate the usage of Selenium for web automation and testing purposes. The focus is on practical learning and experimentation, making this repository ideal for those new to Selenium or looking to enhance their skills.

Prerequisites

  • Microsoft Visual Studio with .NET Framework
  • Selenium WebDriver
  • ChromeDriver (or any other browser driver you prefer)

Installation

  1. Clone the Repository: Clone this repository to your local machine.
  2. Open the Solution: Open the solution file in Visual Studio.
  3. Restore NuGet Packages: Ensure all required NuGet packages are restored and up-to-date.
  4. ChromeDriver Path: In the test scripts, update {{path_to_chrome_driver}} with the actual path to your local ChromeDriver executable.

Running Tests

To run the tests, simply navigate to the Test Explorer in Visual Studio and execute the desired tests. The repository includes multiple test scripts demonstrating different functionalities and use cases of Selenium WebDriver.

Test Scripts

  1. UnitTest1: Demonstrates basic Selenium operations using Firefox and Chrome drivers.
  2. UnitTest2: Focuses on interacting with web elements and implementing waits.
  3. UnitTest4: Deals with more advanced element interaction and assertions.
  4. UnitTest5: Showcases the usage of XPath for element selection and form handling.

Contributing

As this is a learning project, contributions in the form of suggestions, bug fixes, or additional test scripts are highly welcome. Please feel free to fork the repository and create pull requests.

License

This project is open-sourced under the Apache 2.0 License.