HomeSelenium

New Selenium IDE – ‘run’ Command

New Selenium IDE – ‘run’ Command

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

run is one of the commands in Selenium IDE.

The purpose of run command in Selenium IDE, is to execute another Selenium IDE Test in the current Selenium IDE Test.

In this article, I am going to practically demonstrate run command in Selenium IDE for executing the Login Test as a reusable test in another Test say searching for an iPhone as shown below:

run Selenium IDE - demo

Let’s get started.

New Selenium IDE – ‘run’ command

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

1) Let’s create the Login test in Selenium IDE for logging into the above-mentioned application using the below Selenium IDE code:

[su_table alternate=”no”]

Command Target Value
open http://tutorialsninja.com/demo/index.php?route=account/login
type id=input-email [email protected]
type id=input-password rkiran
click xpath=//input[@value=’Login’]

[/su_table]

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

run Selenium IDE - login test type

2) Let’s create another Selenium Test for logging into the application and searching for ‘iPhone’ by writing the below code:

Note: As we need to login for this scenario and the Login Test is already created, we can reuse the Loing Test in this current Search Test by using the ‘run‘ command in Selenium IDE as shown in the below code.

[su_table alternate=”no”]

Command Target Value
run Login
type name=search iphone
click css=i[class$=’search’]

[/su_table]

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

run Selenium IDE - search test type

3) Click on ‘Run current test’ option and observe that the test got successfully executed and the Login Test which is part of the Current Test also got executed as shown below:

run Selenium IDE - executed

Here concludes the practical demonstration of run command in Selenium IDE for executing other reusable tests in the current test.

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