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.

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.

2

Fig.2

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

3

Fig.3

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

4

Fig.4

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

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.

6

Fig.6

7

Fig.7

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

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.

9

Fig.9

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

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.

11

Fig.11

12

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.

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.

14

Fig.14

15

Fig.15

 

Wishing you the Best in Your Efforts…!!

 

Related

What are Frames? How to handle frames in Selenium WebDriver with C#?

IFrame (FullForm: Inline Frame) is an HTML document that is included in another HTML document and is...

Read More >

What is Synchronization? Handling Synchronization in Selenium WebDriver using C#:

Synchronization meaning: when two or more components involved to perform any action, we expect these...

Read More >

Sending Test reports by Email using Office 365, Gmail

Wouldn’t it be great if Test Report are sent automatically across team as soon the Test Execut...

Read More >

Extent Reports in Selenium CSharp (C#)

Reports play a fundamental role when it comes to TESTING. Tester can now  know the real-time r...

Read More >

Assertions in Coded UI

Let us discuss how to add assertions in coded UI. Assertions are checkpoints/benchmarks to UI c...

Read More >

Custom Control in WPF

File Upload Custom Control in WPFThis article is about Custom control in WPF, Custom controls are al...

Read More >

Analysis of Load Test Results

Analysis of Performance DataAfter you capture and consolidate your results, analyze the captured dat...

Read More >

Parallel Execution using Selenium Webdriver and TestNG

While testing a web application it is very important to test the application on different browsers. ...

Read More >

ASP.NET: Audit Trail Implementation using Entity Framework

When you are working with certain projects which involves the Customer records, you might need to tr...

Read More >

Share

Post a Comment

  • Recent
  • Popular
  • Tag
Tags
Monthly Archive
Subscribe
Name

Contact Us
  • *
  • *