While Loops
Cycle has the ability to repeat groups of Steps using while loops. The basic syntax and flow of a while loop are shown in the diagram below.
Cycle will repeat all the Steps between the While and the EndWhile keywords until the conditional Step fails. When the conditional Step fails, execution will continue at the first Step after the EndWhile. The Feature File shown in the following figure will continue to prompt the user for a value until the user replies with a value not equal to Y.
Any Step can be used as the conditional Step of a while statement. This functionality allows you to create while loops that are based on graphic images or even other Scenarios.
The figure below demonstrates using a graphic image for a conditional Step. When executed, the script will stay in the while loop until the Cycle Labs Logo is no longer found when scanning the screen.