βœ…Assertions

Assertions are basically statements or phrases that check if the tool is currently on the correct screen, before executing the instructions, which helps in making your tests more robust. This will also be valuable if your tests require checking specific elements in a screen. Steps with assertions can be created by using this format:

WAIT UNTIL THE {{ELEMENT}} APPEARS ON THE SCREEN. ONCE IT DOES, {{INSTRUCTIONS}}

For apps with dynamic loading times, you can add a WAIT COMMAND as a step:

WAIT X SECONDS. 

Alternatively, you can add the wait command to the assertion statement

WAIT X SECONDS OR UNTIL THE {{ELEMENT}} APPEARS ON THE SCREEN. ONCE IT DOES, {{INSTRUCTIONS}}	

Optional steps are commonly used for unexpected or random screens/ screens or pop-ups. Optional steps can be created using this format:

CHECK IF THE {{ELEMENT}} APPEARS ON THE SCREEN. IF IT DOES, {{INSTRUCTIONS}}. OTHERWISE, [{ALTERNATE INSTRUCTIONS}}	

Last updated