51 Elliot: Selenium IDE Flow Control – Goto and While Loops.

This exension provides goto, gotoIf and while loop functionality in Selenium IDE. Selenium IDE is a plugin for Firefox that automates the testing of web-based applications. There is an excellent flow-controll extension for the Selenium Server and TestRunner components, but it does not work with Selenium IDE (the Firefox plugin) directly. This makes it difficult to develop controlled test cases within Selenium IDE, and there are times when the frame-based TestRunner cannot be used (such as when the website under test employs a frame-buster script).

I’ve ported the existing control-flow extension to work in the Selenium IDE Firefox add-on. The image below shows a sample test case using goto, gotoIf and a while loop, all running successfully in Selenium IDE.

The file linked at the end of this post should be saved as “goto_sel_ide.js” to your hard drive. Then the Options settings in Selenium IDE should set the Selenium Core extensions to include the path of this file, similar to the image below.

Link:

Download goto_sel_ide.js here

Copy & Paste the contents into a new file and save it as “goto_sel_ide.js” in a location such as C:\Documents and Settings\goto_sel_ide.js and configure the Selenium Options tab as shown.  NOTE: please copy and paste the text rather than downloading the file – some people have had formatting issues that prevented the dowloaded file from working. So COPY & PASTE and you should be fine.

Update 26 February, 2006:
This mod of the FlowControl extension works only with the Selenium IDE Firefox add-on. If you want to use the TestRunner component or Selenium RC, please use the original FlowControl extension.