Home  >  Blog  >   Selenium  > 

Selenium Commands – “Selenese”

Rating: 4
  1. Share:
Selenium Articles

Selenium Commands

Selenium commands, often called selenese, are the set of commands that run your tests. A sequence of these commands is a test script

A command is what tells Selenium what to do. Selenium commands come in three “flavors”: Actions, Accessors, and Assertions.


Actions are commands that generally manipulate the state of the application. They do things like “click this link” and “select that option”. If an Action fails or has an error, the execution of the current test is stopped.

Many Actions can be called with the “AndWait” suffix, e.g. “click and wait”. This suffix tells Selenium that the action will cause the browser to make a call to the server and that Selenium should wait for a new page to load.

Accessors examine the state of the application and store the results in variables, e.g. “storeTitle”. They are also used to automatically generate Assertions.

Assertions are like Accessors, but they verify that the state of the application conforms to what is expected. Examples include “make sure the page title is X” and “verify that this checkbox is checked”.

All Selenium Assertions can be used in 3 modes:

For example, you can “assertText”, “verifyText” and “waitForText”. When an “assert” fails, the test is aborted. When a “verify” fails, the test will continue execution, logging the failure.

1. assert
2. verify
3. waitFor

Selenium Interview Questions

Editing a test case:

Insert Command:

Table View:

Select the point in your test case where you want to insert the command. To do
this, in the Test Case Pane, left-click on the line where you want to insert a new

For more Information click: Selenium Commands

Insert Comment:

Comments may be added to make your test case more readable. These comments are ignored when the test case is run


Select the line in your test case where you want to insert the comment. Right-click and select Insert Comment. Now use the Command field to enter the comment. Your comment will appear in purple font


Souse view:

Select the point in your test case where you want to insert the comment. Add an HTML-style comment, i.e., .
Edit a Command or Comment

MindMajix YouTube Channel

Table View

Simply select the line to be changed and edit it using the Command, Target, and Value fields

Opening and Saving a Test Case

Like most programs, there are Save and Open commands under the File menu. When you open an existing test case or suite, Selenium-IDE displays its Selenium commands in the Test Case Pane.

Also Read: Running Test Cases in Selenium



Join our newsletter

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
Selenium Training Jun 03 to Jun 18
Selenium Training Jun 06 to Jun 21
Selenium Training Jun 10 to Jun 25
Selenium Training Jun 13 to Jun 28
Last updated: 30 May 2023
About Author
Remy Sharp
Madhuri Yerukala

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

Recommended Courses

1 /15