In the on-going ‘Selenium xUnit testing tutorial’ series, we earlier had a look at setting up the xUnit framework in Visual Studio. It was a getting started guide with a major focus on the installation of the xUnit framework for the project. Before setting up Selenium WebDriver for xUnit, we recommend that you check out the installation guide on xUnit Testing Tutorial: Environment Setup For Selenium Testing, in case you are starting up with the Selenium xUnit framework.
In this Selenium xUnit tutorial, we take a quick look at how to install Selenium WebDriver in Visual Studio for performing automation testing with C#.
Creating a New C# Project in Visual Studio
Before installing Selenium WebDriver, we create a new project in C# by following the below-mentioned steps:
- Open Visual Studio and create a new project of the type ‘xUnit Test Project (.Net Core)’.
- As the project uses the xUnit.net (or xUnit) framework, the C# file contains the [Fact] attribute….