Selenium – IDE User Extensions

We can extend Selenium IDE by adding customized actions, assertions and locator-strategies. It is done with the help of JavaScript by adding methods to the Selenium object prototype. On start-up, Selenium will automatically look through the methods on these prototypes, using name patterns to recognize which ones are actions, assertions, and locators.

Let us add a ‘while’ Loop in Selenium IDE with the help of JavaScript.

Step 1. Open Firefox Browser and navigate to https://github.com/darrenderidder/sideflow/blob/master/sideflow.js and copy the script and place save it as ‘sideflow.js’ in your local folder as shown below.

selenium_Sideflowjs

Step 2.  Now open the Selenium IDE and Click on  Options > Options as shown below.

Selenium_IDE_Options

Step 3. Click the Browse button under Selenium IDE Options popup and point to the js file that we have saved in Step 1. Click Ok button.

Selenium_IDE_Browse_Options

Step 4. Restart Selenium IDE.

Step 5. Now you will have access to a few more commands such as Label, While etc.

Step 6. Now we will be able to create a While loop within Selenium IDE and it will execute as shown below.

Selenium_IDE_While

 

Leave a Reply

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