Selenium Automated Web Testing Flow Control
First, here are some Selenium related links:
* Selenium HQ: http://seleniumhq.org/
* Selenium Flow Control: http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html
You need to add extension "goto_sel_ide.js" from the following link: http://docs.google.com/Doc?id=dm6sk55_37fmpg8tcr
Detailed instructions on how to add this extension may be found at the 'Selenium Flow Control' link above.
Please note that you have to restart Selenium IDE Firefox plug-in in order to have the extension add-on kick in.
One of the major operations required during tests is flow control.
Sometimes you need to skip a command or commands and not execute them.
For example you try to perform a deletion operation but the element doesn’t exist and applying the deletion operation would result in an error.
Follow these guidelines to create a branch, Below is a short code snippet sample"
storeTextPresent || [some_value] || [variable_name]
gotoIf || storedVars['variable_name'] == true || goto_label_name
.... // Command to execute if the condition is not met
label goto_label_name // This is where the script will jump to when
.... // Command to execute if the condition is met, this part may be off course unrelated to the initial condition
* The "storeTextPresent" command will set variable_name to true if some_value exists on the page and false otherwise
* The "gotoIf" command checks the storedVars['variable_name'] for either true or false. If the condition is met the script will "jump" to goto_label_name
* Whatever commands you wish to execute if the condition is not met should follow the label. The part after the label may be off course unrelated to the initial condition
* label goto_label_name this is the label that marks the start of the part that executes after the condition is jumped. Note that this code, unless defined otherwise, would execute regardless of the condition and in any case