HomeSelenium

New Selenium IDE – Using ‘assert’ command

New Selenium IDE – Using ‘assert’ command

Refer the article New Selenium IDE – Commands (Selenese), for the complete list of Selenium IDE commands and their practical demonstrations.

assert is one of the commands in Selenium IDE.

The purpose of the assert command is to check the value stored in a variable is according to the expected result.

In this article, I am going to practically demonstrate assert commands in Selenium IDE for checking whether the retrieved title stored in a variable is according to the expected title text as shown below:

assert Selenium IDE - demo

Let’s get started.

New Selenium IDE – assert command

Follow the below steps for practicing assert command in Selenium IDE along with me:

1) Let’s write the below code in Selenium IDE to check whether the title of the page that got retrieved and stored in a variable is the same as the expected title text.

[su_table alternate=”no”]

Command Target Value
open http://omayo.blogspot.com/
store title x
assert x omayo (QAFox.com)

[/su_table]

After incorporating the commands in the above table, Our Selenium IDE should look like below:

assert Selenium IDE - typing

2) Run the test and observe that the test will be passed as the retrieved title of the page is same as the expected title text:

assert Selenium IDE - executed

Here concludes the practical demonstration of assert command in Selenium IDE for checking the value stored in a variable with the expected value.

In the next article, I will practically demonstrate another Selenium IDE command.

Next Steps:

  • > Check complete Selenium Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning ?

About Me > Arun Motoori

On a mission to contribute to the Software Testing Community in all possible ways.

Refer the article New Selenium IDE – Commands (Selenese), for the complete list of Selenium IDE commands and their practical demonstrations.

Comments (0)

Leave a Reply

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

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp