Git Product home page Git Product logo

selenium-webdriver-c-sharp's Introduction

selenium-webdriver-c-sharp

Tutorials and sample web automation framework using Selenium WebDriver and C#

Installation

  1. Make sure you have .NET 8 SDK or newer installed on your machine (projects were developed using .NET 8). Check installation
    dotnet --version
  2. Clone this repository to your local machine.
  3. Open the solution (SeleniumWebDriverProject.sln) in Visual Studio or folder (selenium-webdriver-c-sharp) in VS Code or your preferred IDE.
  4. Build solution from IDE or from terminal navigate under solution folder or a project you want to build and run dotnet build (implicit restore).
    dotnet build

Usage

  1. Make sure you have the appropriate browser installed (https://www.selenium.dev/documentation/webdriver/browsers/)
  2. Open the solution directory in VS Code or your preferred IDE.
  3. Using terminal navigate to a project (cd command) and run
    dotnet build
  4. Run the tests using your preferred test runner or IDE. From terminal, in your project folder, change "net_version" and "project_name" e.g.
    dotnet test .\bin\Debug\net_version\project_name.dll
  5. Optional: check reports (depending on the project you run, the reports may by integrated with ExtentReports or Allure)

Tech

  • .NET 8
  • C#
  • Selenium WebDriver
  • NUnit
  • .NET.Test.SDK
  • Extent Reports
  • Allure
  • Autofac

Design patterns

  • Page Object Model
  • Singleton (Extent reports)
  • Dependency Injection (Autofac)

Tutorials:

  • First Selenium test
  • Introduction to browser drivers
  • Locators, relative locators
  • Find element(s) on the web page
  • Web elements interactions
  • Wait conditions
  • First Selenium framework
  • Extent reports
  • Allure reports
  • Singleton
  • Parallel run
  • Dependency Injection

YT channel

Please check my YouTube channel for step by step implementation or detailed tutorials on automation and more: https://www.youtube.com/@TechWithAlexDuta

License

This project is licensed under the MIT License - see the LICENSE file for details.

selenium-webdriver-c-sharp's People

Contributors

techwithalexduta avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.