gotoIf flow control - Selenium IDE
gotoIf (expression, label) - Selenium IDE command
Flow control logic 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.
GotoIf_V2 uses executeScript_Sandbox
In the macro source code the new version of GOTOIF is "Command": "GotoIf_v2". The old version continues to use "Command": "GotoIf" for backward-compatibility.
GotoIf flow control - Demo Video
This video shows how to use gotoIf and storeValue to wait for the user to select a file. It loops between gotoIf...label until the length of the extracted string is greater than 1.Click [ ] in the video player to enlarge the video.
The example below is very basic. Best if you see the flow logic in action by running the DemoIfElse macro that installs with the IDE.
|gotoIf||8 > 5||MYLABEL|
|echo||This line 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.