How Do You Run a Test Case in Selenium IDE?

Timothy Joseph Timothy Joseph | December 21, 2020

How Do You Run a Test Case in Selenium IDE?

Selenium IDE is a Firefox and Chrome extension that magnifies the scope of web application testing services by building tests without the need for any programming knowledge through its playback functionality.

We will first discuss how teams can create a test for search text on google search engine using selenium commands and then try to run it in Selenium IDE:

  • Launch browser (Chrome or Firefox) and click on the Selenium icon available on the top right corner of the browser to launch the default interface of Selenium IDE
  • Name your Project as "My_First_Selenium_Project" and test as "My_First_Selenium_Test"

Name your new Project

Insert Commands

  • Click in the command textbox available on the Test Script Editor

Insert Commands

  • Provide "Command: Open" and "Target:" to open google search engine in browser URL

Command: Open

  • For discovering unique locator of Google search text box, right click in the box and click "Inspect Element"

Inspect Element

  • It will show a window with all the HTML code of the google search engine page, pick the div tag with attribute jsname that contains the unique value of the textbox

Unique Value of the Textbox

  • Provide "Command : click at" and "Target : //div[@jsname="RNNXgb"]//input[@name="q"]" in the properties of second command to click in the textbox of Google search engine Page

Command : click at

  • Provide "Command : type", "Target : //div[@jsname="RNNXgb"]//input[@name="q"]w" and "Value = Selenium Tutorial" in the properties of the third command to type the specified text in Google search textbox

Command : type

  • For discovering unique locator for the Search button, Right-click on the 'Google search' button and click "Inspect Element". Pick the input tag element that contains the unique value of the button

Google Search Button

  • Provide "Command : click at" and "Target : //div[@jsname="VlcLAe"]//input[@name="btnK"]" in the properties of the fourth command to click on the Search button present on Google search engine page

Command : click at

Executing the Test Script

  • To run the test, click on the "Run Current Test" button displayed on the toolbar menu of the IDE. It will execute all the commands in the provided sequence and give an overall result of the test script

Run Current Test

  • The Log pane below will display the result of all the executed tests

Log Pane

We can further add as many tests as we want and run them based on the feature that we would like to automate in the same test script


This publication is for informational purposes only and nothing contained in it should be considered legal advice. We expressly disclaim any warranty or responsibility for damages arising out of this information and encourage you to consult with legal counsel regarding your specific needs. We do not undertake any duty to update previously posted materials.

Post a Comment