Selenium IDE- Commands (Selenese)

Last updated on Nov 24 2021
Manikaran Reddy

Table of Contents

Selenium IDE- Commands (Selenese)

Selenium commands, also referred to as “Selenese” are the set of commands utilized in Selenium IDE that run your tests. Using selenese, one can perform activities like:
• Testing the existence of UI elements supported their HTML tags.
• Test for specific content.
• Test for broken links.
• Testing input fields, selection list options, submitting forms and table data among other things.
• Testing of window size, mouse options, alerts, Ajax functionality, pop-up windows, event handling and lots of other web application features.
A sequence of Selenium commands (Selenese) together is understood as test script.
Types of Selenium Commands
Selenium commands are basically classified in three categories:
1. Actions
2. Accessors
3. Assertions
1. Actions
Actions are the selenium commands that generally manipulate the state of the appliance . Execution of Actions generates events like click this link, select that option, type this box, etc. If an Action fails, or features a bug, the execution of current test is stopped.
Some of the foremost commonly used Actions commands include:

Command/Syntax Description
open (url) It launches the desired URL in the specified browser and it accepts both relative and absolute URLs.
type (locator,value) It sets the value of an input field, almost like user typing action.
typeKeys (locator,value) This command simulates keystroke events on the required element.
click (locator) This command enables clicks on a link, button, checkbox or radio button.
clickAt (locator,coordString) This command enables clicks on an element with the assistance of locator and co-ordinates
doubleClick (locator) This command enables double clicks on a webelement  supported the required element.
focus (locator) It moves the main target to the required element
highlight (locator) It changes the background color of the required element to yellow to spotlight is beneficial for debugging purposes.
close() This command simulates the user clicking the “close” button in the title bar of a popup window or tab.
store (expression,variableName) This command specifies the name of a variable in which the result is to be stored and expression is the value to store
waitForCondition (script,timeout) This command executes the specified JavaScript snippet repeatedly until it evaluates to “true”.

2. Accessors
Accessors are the selenium commands that examine the state of the appliance and store the leads to variables. they’re also wont to automatically generate Assertions.
Some of the foremost commonly used Accessors commands include:

Command/Syntax Description
storeTitle (variableName) This command gets the title of the present page.
storeText (locator, variableName) This command gets the text of a component
storeValue (locator,variableName) This command gets the (whitespace-trimmed) value of an input field.
storeTable (tableCellAddress, variableName) This command gets the text from a cell of a table.
storeLocation (variableName) This command gets the absolute URL of the present page.
storeElementIndex (locator, variableName) This command gets the relative index of a component to its parent (starting from 0).
storeBodyText (variableName) This command gets the whole text of the page.
storeAllButtons (variableName) It returns the IDs of all buttons on the page.
storeAllFields (variableName) It returns the IDs of all input fields on the page.
storeAllLinks (variableName) It returns the IDs of all links on the page.

3. Assertions
Assertions are the commands that enable testers to verify the state of the appliance . Assertions are generally utilized in three modes assert, verify and waitfor.
Some of the foremost commonly used Assertions commands are:

Command/Syntax Description
verifySelected(selectLocator, optionLocator) This command verifies that the choosen option of a drop-down satisfies the optionSpecifier.
verifyAlert (pattern) This command verifies the alert text; used with accessorstoreAlert.
verifyAllButtons (pattern) This command verifies the button which is used withaccessorstoreAllButtons.
verifyAllLinks (pattern) This command verifies all links; used with the accessorstoreAllLinks.
verifyBodyText(pattern) This command verifies the body text; used with the accessorstoreBodyText.
verifyAttribute(attributeLocator, pattern) This command verifies an attribute of an element; used with the accessorstoreAttribute.
waitForErrorOnNext (message) This command enables Waits for error; used with the accessorassertErrorOnNext.
waitForAlert (pattern) This command enables waits for the alert; used with the accessorstoreAlert.
verifyAllWindowIds (pattern) This command verifies the window id; used with the accessorstoreAllWindowIds.

So, this brings us to the end of blog. This Tecklearn ‘Selenium IDE- Commands (Selenese)’ blog helps you with commonly asked questions if you are looking out for a job in Selenium and Automation Testing. If you wish to learn Selenium and build a career in Automation Testing domain, then check out our interactive, Selenium Certification Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/selenium-training-certification/

Selenium Certification Training

About the Course

Tecklearn’s Selenium Certification Training enables you to master the complete Selenium suite. The Selenium Training is designed to train developers and manual testers to learn how to automate web applications with a robust framework, and integrate it within the DevOps processes of an organization. This Selenium Certification Training will also help you master important concepts such as TestNG, Selenium IDE, Selenium Grid, Selenium WebDriver, etc. Get hands-on experience on widely used automation frameworks such as Data-Driven Framework, Keyword-Driven Framework, Hybrid Framework, and Behavior Driven Development (BDD) Framework. Throughout this online Instructor-led Selenium Certification Training, you will be working on real-life industry use cases.

Why Should you take Selenium Certification Training?

• The average salary of a Selenium Test Automation Engineer is $94k per year – Indeed.com.
• Automation Testing Market is expected to grow at a Compound Annual Growth Rate (CAGR) of 18.0% in the next three years.
• Global software testing market to reach $50 billion by 2020 – NASSCOM. Selenium tool supports more browsers and languages than any other testing tool.

What you will Learn in this Course?

Getting started with Selenium
• Introduction to Selenium testing
• Significance of automation testing
• Comparison of Manual and Automation Testing
• Installation of Java JDK, JRE and Eclipse
Setting the environment in Eclipse for Selenium
• Java Introduction
• Creating a Java function and executing
• Concepts of Java
• Properties File
• Reading Data from Excel File
• Database Connection
• Hands On
Advantages of Selenium automation testing
• Selenium Features
• Concept of Selenium Integrated Development Environment
• Understanding of the Selenium IDE features
• Addition of Script assertions and general commands
• Deploying the first Selenium Script
• Sample project IDE
• Recording Selenium test case
• Hands On
Selenium Web driver Automation
• Architecture of Selenium Web Driver
• Download and installation
• Creating a Java function using Selenium and execution
• Hands On
Deploying Web Drivers for scripting
• Getting the HTML source of Web Element
• Table and Form Elements
• Firebug extension and Fire Path installation
• Advance User Interactions and Cross Browser Testing
• Hands On
Deep dive into Selenium Web Driver
• Action Commands
• Web Table / Date Picker
• How to Implement Switching Commands in WebDriver
• Alerts
• Frames
• Hands On
Switching Operations in WebDriver using Window
• Selenium Webdriver Wait
• Implicit wait, Explicit wait
• Deploying searching elements using the link text, name, using XPath
• Calendar
• Hands On
Introduction to TestNG Framework
• Introduction to TestNG
• Advantages of TestNG
• Installing TestNG on Eclipse
• Rules to write TestNG
• TestNG Features
• Annotations
• Grouping
• Sequencing: Prioritization and Dependency
• Enable/Disable a test case
• Parameterization: Using Xml file and DataProvider
• Parallel Testing & Cross Browser Testing
• TestNG Report: HTML Report, Console Report, XML Report
JUnit Operations and Test Framework
• Annotations, Methods in JUnit
• Junit Test Suites, ANT Build and JUNIT reporting
• Types of Test Automation Framework
• Module Based Testing Framework
• Data Driven Testing Framework
• Keyword Driven Testing Framework
• Hybrid Driven Testing Framework
• How to implement Testing Framework in Project
Object Repository
• Understanding of Object Repository
• Learning sample scripts using object repository
• Page Object Modelling
• Page Factory
JavaScript Functions
• Autosuggestion
• Headless Browser
• Sikuli
• XPath

Got a question for us? Please mention it in the comments section and we will get back to you.

 

0 responses on "Selenium IDE- Commands (Selenese)"

Leave a Message

Your email address will not be published. Required fields are marked *