×

Selenium IDE Commands

Selenium –IDE Commands (SELENESE):

Selenese commands are the set of commands used in Selenium IDE. Selenese command has two parameters target and value.

Selenese command tests the existence of UI elements based on their HTML tags, test for broken links, input fields, submitting forms, and check for specific content, Selection list options, and table data among other things.

 Selenium commands support testing for Ajax functionality, window size, mouse position, and alerts, pop up windows, event handling, and many other web-application features. 

We have three types of Selenium IDE commands:

Actions Command:

Actions command directly interact with page element, e.g.-  

COMMAND WEB ELEMENT
Type/send keys Edit Box
Click Check box, Radio button
Click and Wait Link
Select Dropdown
Click and Wait Image

If an Action command fails, it has an error, and then the execution of the current test is stopped.

Some commonly used actions command is as follows:

Command/Syntax Description
open (url) Open a browser using a URL
type /send keys (locator, value) It is a sequence of character use while performing an action on the edit box.
click (locator) Click command is enabled when the user clicks on a link, button, checkbox, or radio button.
clickAt (locator,cordString) It is enabled when the user clicks on an element with the help of the locator and its co-ordinates.
doubleClick (locator) This command is enabled when the user double clicks on a web element.
focus (locator) It moves the focus to the specified element.
highlight (locator) It is used to change the background color of the specified element.
close() The user is clicking the close button in the title bar of a popup window or tab.
store (expression,variableName) Specifies the name of a variable in which the result is to be stored, and expression is the value which is to be stored.
waitForCondition (script,timeout) Executes the specified JavaScript repeatedly until it is true.

Accessors Command:

Accessor’s commands are used to examine the state of the application and store the value in a variable.

 The most commonly used Accessors commands are as follows:

    Command/Syntax       Description
storeTitle (variableName) storeTitle command helps us to get the title of the current page.
storeText (locator, variableName) storeTextcommand is used to get the text of an element.
storeValue (locator,variableName) It is used to get the value of an input field.
storeTable (tableCellAddress, variableName) storeTable command helps us to get the text from a cell of a table.
storeLocation (variableName) To get the absolute URL of the current page.
storeElementIndex (locator, variableName) This command gets the relative index of an element to its parent (starting from 0).
storeBodyText (variableName) To get the entire text of the page.
storeAllButtons (variableName) It will return the IDs of all buttons on the page.
storeAllFields (variableName) Return the IDs of all input fields on the page.
storeAllLinks (variableName)  It will return the IDs of all links on the page.

Assertions Command:

These commands are used to verify if a specific condition met.

Assertions divided into three modes -

  • Assert
  • Verify  
  • WaitFor

The most commonly used Assertions commands are: 

Command/Syntax Description
verifySelected(selectLocator, optionLocator) Verify that the selected option of a drop-down satisfies the optionSpecifier.
verifyAlert (pattern) It is used to verify the alert text with the help of accessorstoreAlert.
verifyAllButtons (pattern) It is used to verify the button with the help of accessorstoreAllButtons.
verifyAllLinks (pattern) Verify all links with the help of accessorstoreAllLinks.
verifyBodyText(pattern) It is used to verify the body text with the help of accessorstoreBodyText.
verifyAttribute(attributeLocator, pattern) Verify an attribute of an element with the help of accessorstoreAttribute.
waitForErrorOnNext (message) Enables Waits for error; with the help of accessorassertErrorOnNext.
waitForAlert (pattern)      It is used to enable waits for the alert:                 accessorstoreAlert.
verifyAllWindowIds (pattern) Verifies the window id; with the help of accessorstoreAllWindowIds.

Related Topics

Selenium Testing

Selenium is a functional testing tool and compatible with non–functional testing tool. Selenium is free and not required any licensing. There are specified types of testing that can be automated using Selenium:-   Functional Testing: Checking every component...

3 minutes read.

Selenium WebDriver - Browser Controls Commands

Selenium WebDriver - Browser Controls Commands WebDriver includes operations like opening a browser, fetch the title, and closing the browser, etc. Some of the most commonly used Browser controls commands for Selenium WebDriver...

6 minutes read.

Mouse and Keyboard Controls in Selenium WebDriver

Mouse and Keyboard Controls in Selenium WebDriver In this tutorial, we will learn about how to handle mouse and keyboard event using action class in selenium WebDriver. Action Class in Selenium WebDriver: Action...

13 minutes read.

WebDriver-Name Locator:

WebDriver-Name Locator: The name locator is used to identify any element in UI with the help of the name backend attribute. The Syntax of the name attribute is as below: driver.findElement(By.name(“value of the...

4 minutes read.

Selenium WebDriver-Alert Popup

Selenium WebDriver-Alert Popup  An alert popup is one of the small message boxes, which used to give some information to the user that displays on the browser. The Alert popup will be...

6 minutes read.

Difference between Selenium WebDriver and Selenium RC

Difference between Selenium WebDriver, and Selenium RC: Selenium WebDriver and selenium RC (Remote Control) both are different in any manners which we see later in this tutorial, let us see the...

3 minutes read.

Name Locator in Selenium IDE

NAME LOCATOR: It is used to find the name in the web element. If we have multiple web elements of the same name, then the first matched element would be returned. Open the...

3 minutes read.

Selenium-IDE Installation in Mozilla Firefox

A beginners guides to Selenium-IDE Installation Since Selenium IDE is designed only for Firefox and Chrome plug-in, we are assuming that you have already installed the Mozilla Firefox browser in your...

1 minute read.

CSS Selector: Attribute in Selenium IDE

CSS Selector: Attribute Locating the attribute of a CSS selector, we would access the Password textbox, which is present in the login form of Facebook. The Password textbox has a type attribute...

1 minute read.

Selenium-IDE Login test

Login test for Selenium-IDE Now we are learning, how to create a Login/sign-up Test case in Selenium IDE. For our testing purpose, we are going to test the login page provided by...

2 minutes read.

CSS Selector Locator in Selenium IDE

It used to identify the web element based on HTML tag, id, class, and attributes. To describe the look and formatting of a document written in the markup language are known...

1 minute read.

Selenium WebDriver - Navigation Controls Commands

Navigation Controls Commands in Selenium WebDriver WebDriver is used to hold the browser history and perform browser navigation operations like, back, forward, and refresh. Whenever a WebDriver launches a browser, all...

5 minutes read.

WebDriver-Id Locator

WebDriver-Id Locator: The Id Locator is used to identify any web element in UI with the help of the ID attribute. The First preference is always goes to ID locator while inspecting...

4 minutes read.

WebDriver Interface | Class Diagram

WebDriver interface/class diagram: The interface of WebDriver includes the following stages, which is as follows: Search Context Web driver Remote web driver Driver class Search Context  The first interface of the web driver class is search Context,...

2 minutes read.

Selenium Wait

In this tutorial, we will understand how we can avoid synchronization issues while executing the test script in a selenium WebDriver. Before going further in this tutorial, first, we will understand that...

10 minutes read.

CSS Selector: Class in selenium IDE

CSS Selector: Class Identify a web element with the help of Class as a CSS Selector is like using id attribute. The only difference between Class and id is in their...

2 minutes read.

Selenium WebDriver- Microsoft Edge Browser

Selenium WebDriver- Microsoft Edge Browser: In this tutorial, we will learn how to launch the Microsoft Edge browser in the Selenium WebDriver. Before we start automating our test script with Microsoft Edge...

4 minutes read.

Selenium IDE Tutorial for Beginners

Selenium IDE Introduction Selenium IDE stands for Integrated Development Environment. Selenium-IDE is released in 2006 and developed by SHINYA [JAPAN] THOUGHTWORK Company. Selenium IDE implemented as a Firefox plug-in, and concedes the record, edit, and debug tests....

2 minutes read.

Selenium WebDriver-CSS Selector: Substring Matching

CSS Selector: Substring Matching Selenium WebDriver In this tutorial, we will learn how to identify the web element using the substring method. A Sub-string contains three methods for identifying the web element...

9 minutes read.

WebDriver-Partial Link Text locator

WebDriver-Partial Link Text locator In selenium WebDriver, there is an additional way to find a web link element with the help of partial link text locator. The partial link text is used...

4 minutes read.