Ask questions or share your requirements with us. We'll get back to you at the earliest.
Wednesday August 7, 2019
Selenium is the recent craze among the software testers. Every tester is including both automation and manual testers are in a race to learn this tool to stay in the competition. One of the biggest features of Selenium is its IDE. Wish to know what’s so special about Selenium IDE?
Selenium integrated development environment that is plugged into Firefox. It is an automation testing tool that is very simple, easy and user-friendly. It offers easy installation, learning, and creation of test scripts. Selenium IDE is based on record and playback principle. It is good for all kinds of testing.
Selenium is widely used automation testing tool and offers extensive features. Some of the common features of Selenium IDE are:
The drawback of Selenium IDE
Selenium IDE is a Firefox plug-in hence it supports only Firefox and the test scripts Created in Selenium IDE can only be executed in Firefox browser.
Downloading and Installing SeleniumIDE
Now when we have a good idea on what is Selenium IDE, let us move to the next step of Downloading and Installing Selenium IDE.
To download Selenium IDE you need to have Mozilla Firefox, if you have it well and good if you don’t have it, download it.
Steps to download and install Selenium IDE
1) Launch Mozilla Firefox Browser.
2) Open Selenium IDE Add-ons page by typing URL: https://addons.mozilla.org/en-us/firefox/addon/selenium-ide/ in your browser. Next Click on Add to Firefox button.
3) You will get a popup asking for your permission to install Selenium IDE Add-ons or not. Click the Install button over the popup.
4) Firefox will then install Selenium IDE software and you will get a popup asking you to restart the Firefox. Click the restart button. The Selenium installation will now be reflected on your browser.
5) After you restart you ur browser you can find the selenium IDE under the tools menu list present at the top bar
6) Click on selenium ide your selenium ide will launch
Selenium IDE is divided into different sections. Before start working on it, you must know about these categories:
present at the uppermost of the Selenium IDE window. The menu bar consists of five sub-modules.
File Menu: File Menu Create, Save and Export Test Case and Test Suite of Selenium IDE. You can open the file menu by pressing Alt + F, or by clicking on the File menu.
Under File menu you can find:
Default Interface of Selenium IDE
Edit Menu: Edit Menu helps to Cut Copy Paste and Insert Command in Selenium IDE Test. You can open the Edit menu by pressing Alt + E, or by clicking on the Edit menu.
Under Edit Menu you can find:
Read also : Selenium 4: New Features and Updates
Actions Menu: Helps us to learn Options to Record Play Run And Debug Selenium IDE Test.
Other categories available at Menu Bar are:
Options Menu and Help Menu
The ToolBar includes the Buttons that Control the execution of test cases, for debugging the test cases, setting up the speed of the test, Stopping, Playing and Recording of test cases.
Test Case Pane
All the test cases recorded by IDE are available in Test Case Pane. It can open more than one test case at the same time and supports easy shuffling between the test cases.
It also offers Test Execution Result Summary including entire Test Suite status, Total number of Test Executed, etc.
Test Case Pane
It is the place where Test Case Steps are recorded. All the user actions are recorded in the order they are performed. It also allows the editing and changing of the test cases
The bottom pane or the Log Pane offers the following functions
The function performed depend upon which tab is selected.
Record the Selenium IDE Test Case.
Save the Selenium IDE Test Case.
File -> Save Test Case As.
PlayBack Selenium IDE Test Script
Open a new tab Firefox. Click the Play button in Selenium IDE. It will execute the previously recorded tests.
Selenium commands or Selenese are a set of test cases that are deployed to test web applications using Selenium.
Selenium commands are of three types:
Actions commands control the state of the application. Operations under action commands are:
Some of these commands can be suffixed with AndWait like clickAndWait, typeAndWait. This prompts Selenium to wait until the web page is loaded. If these commands fail, the existing test is stopped.
These commands automatically create Assertions and inspect the state of the application.
They inspect the state of the application adapts to what is anticipated.
They can be further divided into three categories:
Some of the Commonly used commands in Selenium IDE:
Locators in Selenium IDE are used to find and match the elements in the webpage that are required to communicate with. The use of right locator promises faster, more trustworthy and low maintenance tests. But choosing the right locators can sometimes become a challenging task.
Locators tell on which GUI elements do Selenium IDE needs to operate on. The correct identification of the locators is very important and it is equally challenging.
There are many commands in Selenium IDE that does not require Locators, but most the commands do require locators. The locators to be used depends on the AUT.
The various types of locator are:
It is the common way to locate different elements as every element has a unique ID.
Target Format: id=id of the element
Consider any test app, let it be Facebook.
Locator name is quite similar to Locator: ID. The only difference is that here we use name instead of ID.
Target Format: name=name of the element.
Consider any test app, let it be Facebook.
This locator is used for hyperlink texts. It can be used by beginning the target with “link=” tailed by hyperlink text.
Target Format: link=link_text
Consider any web app as a text app.
CSS Selectors are though a complex method to locate elements on a web page, but they are the most preferred method of locating elements in advanced Selenium as they can even detect elements that have no name or no ID.
CSS Selectors are also string patterns That has the ability to recognize an element based on its arrangement of HTML tag, id, class, and attributes. CSS Selectors have many formats, but the most common are:
XPath is a language for navigating DOM (document object model) of a web page. It can locate any element on the web page and is hence the most potent and supple locator.
Some of the Firefox Add-ons that can help in finding XPath of an element:
If you wish to learn more about selenium we have comprised a tutorial just for you which will take you deep into the tool. Click here