What is Selenium WebDriver ?
WebDriver is a automating web application testing tool. This provide APIs that easily integrate with any programming language such as C#, java, python.
For details please go through the url.
The use of Selenium WebDriver is to basically test any web application.
What is C# ?
C# is a programming language of Microsoft that enables developers to build a variety of secure and robust application that run on the .NET Framework.
Why we need to integrate Selenium WebDriver with C# ?
We can easily integrate the API or drivers in our C# application and test the Web Application.
How to integrate Selenium Webdriver with C# ?
Before going on actual integration one should have infrastructure setup.
Steps to setup infrastructure:
CreatCreate simple project to integrate Selenium webdriver with C# in Visual Studio.
Step 1: Open Visual Studio.
Step 2: Create New Project.
Select Test project from the right panel and then select Unit test Projects.
If you are unable to found the Test project, then select the online template option and search for the template. e simple project to integrate Selenium webDriver with C# in Visual Studio.
Step 3: Adding Selenium references or drivers in C# project.
- Firstly, open solution explorer.
- Then expand the project.
- Right click on references and select ‘Manage Nuget Packages’ option.
- Then you can see the following screen:
Then follow steps as in the following image:
- Search Selenium webdriver.
- Select Selenium.webdriver
- Click install.
After successfully installing you can see the following screen.
Now your visual studio is all set-up to write your first code.