Tuesday 26 August 2014

Selenium Tool : Configure selenium tool for asp.net C# website or project in Visual Studio

It is very easy to configure selenium tool for asp.net website or project.

We can configure selenium tool and it's DLL into Visual Studio by creating new 'website' or 'project' or in Existing 'website' or 'project'.

In previous article you can see the article of how to download selenium webdriver tool.

Here are some steps to configure selenium webdriver tool :

STEP 1 : Open Visual Studio like VS2010, VS2012 or VS2013
STEP 2 : Go to File menu and click on 'New Web Stite' Menu, Now it will open dialog box in that dialog box select 'Empty Web Site' template and give your website name in below text box. After that click on 'OK'. Now your website is created.


[Image : Create Website Step 1]:
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)


[Image : Create Website Step 2] :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

STEP 3 : Now open Solution Explorer window, after that do right click on 'web site name', it will open menu in this menu go to 'Add' menu, after that another sub menu open in that menu click on 'Reference' menu. It will open one dialog box.

[Image : Add selenium DLL References Step 1]  :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

STEP 4 : Now in this dialog box select 'Browse' menu and click on 'Browse...' button it will open dialog box to select DLL files. Now using that dialog box go to location where your save your selenium DLL and select all DLLs and click on 'Ok' and also click on 'Ok' of reference dialog box, after that, you can see in solution explorer that your DLL is added in 'bin' folder.

[Image : Add selenium DLL References Step 2]  :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

[Image : Add selenium DLL References Step 3]   :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

[Image : Add selenium DLL References Step 4] :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

STEP 5 : Now add one aspx page and in that page you import that DLL namespace like 'using Selenium;' and 'using OpenQA.Selenium;'.

[Image : Add new aspx page Step 1]  :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)


[Image : Add new aspx page Step 2]  :
Selenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

[Image : Import Selenium DLL reference in aspx file] : 
Selenium : Configure selenium tool for asp.net C# website or project in Visual StudioSelenium : Configure selenium tool for asp.net C# website or project in Visual Studio
(To view original size image , click on image)

Now you are able to use selenium tool DLLs.

Full Video : 

2 comments:

  1. hi can you send me or upload the .dll files for selenium.

    ReplyDelete
  2. The webdriver will run in client o server side?

    ReplyDelete