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.
On New Project windows popup > Select Visual C# > Windows > Console Application > Enter Name and Location and click on OK button. Refer Fig.2.
Created Project will display in the Solution Explorer. Refer Fig.3.
Install Selenium WebDriver : Right click on Reference > Select Manage NuGet Packages option. Refer Fig.4.
NuGet Package windows popup > select the Browse option > Enter search value into the search field as ‘Selenium’. Refer 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.
Once installation process ends, installed WebDriver will display under Reference. Refer 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.
Once NUnit Framework installed into the system it will display under Reference. Refer 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.
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.
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.
Wishing you the Best in Your Efforts…!!