while, endWhile flow control - Selenium IDE
while (expression), endWhile() - Selenium IDE command
The part between while (expression) and endWhile is executed as long as the expression is true. For sample expressions see also storeEval. If the he expression is false, the IDE executes the immediate next command after endWhile.
Flow control is a regular Kantu Selenium IDE feature. In the classic Selenium IDE you can add support for flow control by installing the Flow Control plugin.
The example below is very basic. Best if you see the while/endwhile loop in action by running the DemocsvSave macro that installs with the IDE. DemocsvSave uses while to loop over all cells in a table row and extract their values.
|while||100 > 5|
|echo||This command is never reached!|
Related Demo Macros
The ready-to-import-and-run source code of all demo macros can be found in the Github repository testmacros folder.
Anything wrong or missing on this page? Suggestions?
...then please contact us.