13Feb
How to Set Up Selenium WebDriver in Visual Studio Enterprise 2015?
Pre-requisite : Visual Studio Enterprise 2015 application should be installed into the system.
Create the new project in Visual Studio : Select New option from File menu and click on Project. Refer Fig.1.

Fig.1
On New Project windows popup > Select Visual C# > Windows > Console Application > Enter Name and Location and click on OK button. Refer Fig.2.

Fig.2
Created Project will display in the Solution Explorer. Refer Fig.3.

Fig.3
Install Selenium WebDriver : Right click on Reference > Select Manage NuGet Packages option. Refer Fig.4.

Fig.4
NuGet Package windows popup > select the Browse option > Enter search value into the search field as ‘Selenium’. Refer Fig.5.

Fig.5
Click on Selenium.WebDriver and Selenium.Support options and select the versions as per project requirement. Click on Install button and complete the installation process. Refer Fig.6 and Fig.7 respectively.

Fig.6

Fig.7
Once installation process ends, installed WebDriver will display under Reference. Refer Fig.8.

Fig.8
Install NUnit Framework : Enter NUnit in Search field of Manage NuGet Package screen. Select the NUnit Framework, click on Install button and complete installation process. Refer Fig.9.

Fig.9
Once NUnit Framework installed into the system it will display under Reference. Refer Fig.10.

Fig.10
Install ChromeDriver, FireforDriver and IEDriver : Enter search value into the search field on NuGet screen. i.e. Selenium. Browser references will display on NuGet screen. Select the required browser reference and click on install. Refer Fig.11 and Fig.12.

Fig.11

Fig.12
Writing Selenium C# script in Visual Studio : Below script is to launch the browser, open Google page and search for ‘Canarys Automations Pvt Ltd’. Refer Fig.13.

Fig.13
Run Selenium C# script : Build the Test, click on Start to Run it. It will launch the browser, open Google page and search for desired value. Refer Fig. 14 and Fig.15 respectively.

Fig.14

Fig.15
Wishing you the Best in Your Efforts…!!
Related
Windows Service in C#:This article is about how to create a Windows Service in C# .net using Visual ...
Read More >
IFrame (FullForm: Inline Frame) is an HTML document that is included in another HTML document and is...
Read More >
Synchronization meaning: when two or more components involved to perform any action, we expect these...
Read More >
Wouldn’t it be great if Test Report are sent automatically across team as soon the Test Execut...
Read More >
Reports play a fundamental role when it comes to TESTING. Tester can now know the real-time r...
Read More >
Let us discuss how to add assertions in coded UI. Assertions are checkpoints/benchmarks to UI c...
Read More >
File Upload Custom Control in WPFThis article is about Custom control in WPF, Custom controls are al...
Read More >
Analysis of Performance DataAfter you capture and consolidate your results, analyze the captured dat...
Read More >
While testing a web application it is very important to test the application on different browsers. ...
Read More >
Share