Working With Selenium IDE in ASP.NET Web Application

I worked on one interesting task where I needed to insert more than five hundred user entries using our recently developed registration module to test the performance and response of it that consists of five steps and each step consists of more than ten fields.


So to provide a single-user entry I needed to fill fifty field entries and to click a button in each step.

I was curious about alternative options to do it as easily as possible. I searched it on Google and came with a solution that is Selenium IDE Addon’s for Mozilla Firefox.

Selenium

Selenium is a well-known open-source automated testing suit for web applications.
The Selenium Suite consists of:

  •  Selenium IDE
  •  Selenium RC
  •  Web Driver
  •  Selenium Grid
Here I am going to use Selenium IDE for Mozilla Firefox.

Download the Selenium IDE for Mozilla Firefox here.

Install the Selenium IDE. After successful installation you can find the Selenium IDE icon in Mozilla as in Figure 1.
 
 

Figure 1: Selenium IDE icon in Mozilla

Demo

I will use the result of my previous article Multi-Step-Registration form using Kendo UI  to explain the application of the Selenium IDE.

The Registration form shown below consists of three steps and each step consist of three fields as in the following figure:

Step 1



Figure 2: Personal Details

Step 2



Figure 3:
Contact Info
 
Step 3



Figure 4: Login Info

Using Selenium IDE

At first time we need to record the action done by the user.

Enter the site URL in the base URL text box of the Selenium IDE tool as in Figure 5.
 


Figure 5: Selenium 2.9.0

Click on the Red button to record the action perform by the user as in the preceding figure.

Now the action done by the user is recorded in the Selenium IDE as in Figure 6.



Figure 6: Show Personal Detail


Figure 7: Show Contact Information
 


Figure 8: Show Login Information
 


Figure  9: Selenium IDE

That’s it! Now it’s time to do the automation. Replace the values in the value field of the IDE and click Run as in the following figure.



Figure 10: Run IDE

Check the table in the SQL database.



Figure 11: Database Table

Yes, the records are inserted.

We can also test the validation in the form using the IDE as in Figure 12:

 

Figure 12: Validation

From the preceding figure we can observe that when the validation is not successful the Selenium IDE will hang and indicate where the validation is failed.

Let us do more than one user registration in a single click as in the following figure.
 


Figure 13: User Registration

Check the table in the SQL database


Figure 14: SQL Database
 
Yes, the records are inserted.

Conclusion

In this article we became familiar with one of the applications in Selenium IDE, I will explain more about the Selenium IDE in my future articles.

I hope you have enjoyed this article, thank you.


Similar Articles