How to configure and use Selenium with C#

Step 1: Download Selenium Core, Selenium IDE and Selenium RC from the website http://seleniumhq.org/download/

Step 2: Installing the IDE. It consists of an XPI file that needs to be added in Firefox.

Step 3: Unzip the Selenium RC folder.

Step 4: To record Scripts, Open the IDE. To run the Selenium IDE, open Firefox and Select it from Firefox tools menu. Refer the screenshot below.

https://digitalab.org/wp-content/uploads/2014/08/IMG-20140706-00002.jpg

To start recording, click on the Red icon ( )

Step 5:

After recording the script, select C# format to convert the scrip in C# format.

ide

Step 6: Configure the .Net client driver.
.Net Client driver can be used with Microsoft Visual Studio. Launch Visual Studio and select new project of type Class Library.
Copy the converted code in the Class1.cs(default name) file and rename the file as required.
Add reference to the following dlls.
nunit.framework.dll
ThoughtWorks. Selenium.Core.dll
ThoughtWorks.Selenium.IntegrationTests.dll
ThoughtWorks.Selenium.UnitTests.dll

Step 7: Build the application.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.