Permalink
Find file
b268426 Dec 30, 2016
106 lines (75 sloc) 3.91 KB

Selenium WebDriver in C#

This repository contains Webdriver code examples, exercises and tutorials for developers. Over time, more and more test example will be uploaded here. All tests examples in this repository is to be considered public domain unless stated otherwise.

Demo website to practice Webdriver:

Here is a list of websites where you can practice Selenium webdriver. You will find the list incredibly useful as these will cover many of your real-time web automation use case scenario. Some of the common examples includes are like testing of a login page, online registration forms, and automating flight booking.

Examples with:

  • Mouse hover
  • Drag & Drop
  • Draggable
  • Selectable
  • Sortable
  • Actionable
  • Radio Button
  • Checkbox
  • Datepicker

Pre-requisites

  • Windows OS
  • Visual Studio

Let's get started

Clone the git repo

$ git clone https://github.com/sayems/csharp.webdriver

Visual Studio

  • (1) Start Visual Studio.
  • (2) On the menu bar, choose File, Open, Project/Solution.
    Navigate to the csharp.webdriver project folder and open it

Install NUnit Templates for Visual Studio

Install NUnit 3 Test Adapter

  • Go to Tools > Extensions and Update
  • Select > Online
  • Search for "NUnit 3 Test Adapter" and install it

Install Nuget package

  • Right-click on your project and click “Manage NuGet Packages”.
  • Search for "Selenium.Support" library and install it
  • Search for "NUnit" Framework and install it

Create NUnit test

Click on Create new project

Select Test and then Select NUnit 3 Test Project to create NUnit 3 project

Add NUnit test from Solution Explorer

Right-click on your project and click Add and then New Item

Select Test and then select NUnit Test Fixture or NUnit Setup Fixture

Congratulations! You have just created your first NUnit test!

Issues

Parallel execution of methods within a class is not yet implemented. More information is provided here: Run test methods within a fixture in parallel

Contributions

If you have any code examples you would like to contribute to this repository, please feel free to open a pull request.

Feedback

Contributors to this repo would be very grateful to receive feedback! If you would like to praise or comment on any test examples, or the repo as a whole, please do so in the issue tracker. I'd love to hear what you think, so please take a moment to let me know.

Contact

If you have any questions about this repo, or need some help to contribute, please do not hesitate to contact me.