Waiting Steps
Cycle is able to run the Steps within a Feature File very rapidly. Often, the application that Cycle is testing does not respond as fast as Cycle can perform Steps, and it is necessary to slow Cycle down to execute tests successfully. Waiting Steps address this need. Waiting Steps are Steps that have a parameter to wait a designated length of time. The amount of time that a Step will wait is specified in either seconds or milliseconds (1 second is equal to 1000 milliseconds).
There are many Steps in Cycle that can wait. The simplest waiting Step is:
I wait <NUMBER> seconds
This Step pauses the Feature File execution for the specified length of time. This Step can be used when you know a specific amount of time will allow the application being tested to be prepared for the next Step. A pause of 2 seconds is typically enough time for an application to complete an operation.
A common waiting Step when performing graphical screen interaction is:
I see "Image:<PATH TO IMAGE>" within <NUMBER> seconds
This command will continue to scan the screen until the image is found. Once the image is found, the execution continues. If the image is not found within the amount of seconds specified, the Step fails.