Add conditional steps
Conditions such as If and If/Else increase the control over test runs, making your script more resilient and robust. You can include conditions in your script.
To add conditional steps:
-
Add a condition in one of the following ways:
- Type If in an empty step and press Enter to form an If condition block. To form an If/Else condition block, type Else in another empty step.
- Hover over an empty step line, click the button, and select Conditions > If / If-Else.
-
Edit the If step's condition. You can check a control's existence, or, for some control types, the control's state. For details, see If / Else.
-
Edit steps in an If or If/Else condition block. For details, see Manually add and edit steps.
-
To use an output parameter to store the condition result, click Set condition result into output parameter in the step editing pane and select the output parameter. The result can be True or False.
See also: