Add conditional steps
Use condition steps to increase the control over script runs, if you want certain steps to run conditionally. You can add condition steps in the editor or the step editing pane.
Types of condition steps
If or Smart If condition steps can check any of the following:
-
The existence, state, or value of objects in your application.
-
The value of an input or output parameter.
-
The content of the application's current screen.
If the condition specified in the If or Smart If step is met, the steps in the If block run. Otherwise, if the script contains a matching Else step, the steps in the Else block run.
The following table describes the condition types supported by If steps.
| Condition type | Description |
|---|---|
| Check the existence of an object |
The condition step checks whether an object exists or does not exist in the application. This may be helpful, for example, to make sure an object is present before performing an operation on it. |
| Check the state of an object |
For AI objects such as checkboxes, radio buttons, and toggles, you can add a condition step that checks the state of the object. Depending on the type of object, you can check whether the object is checked, not checked, selected, not selected, on, or off. |
| Check the value of an object |
For AI objects with a string value, such as button, text box, field, or input, you can add a condition step that checks the value of the object. You can check whether the value is empty or not, and whether it is or isn't equal, containing, or within a specified string.
|
| Check the value of a parameter |
For input or output parameters, you can add a condition step that checks the current value of the parameter. You can check whether the value is empty or not, and whether it is or isn't equal, containing, or within a specified string. |
Smart If using Aviator
Smart If steps are powered by Aviator and let you describe any condition you want to check using plain text.
Note: Smart If steps require an
Aviator license.
Use a
Smart If step to check any of the following:
-
The value of an AI object that has a string value. For example, a button, text box, field, or input.
-
The value of a parameter.
-
The content of the application's current screen. "Current screen" refers to the visible area of the application. You can check anything about the screen's content.
You can describe the condition in plain language, without going into technical detail. For example, you could have a step that checks the validity and relevance of a date range or email address, or a step that makes sure all items displayed on the screen are of a certain type.
You can include script parameters in the condition by typing @ and then selecting an existing parameter from the list or clicking + New parameter to create one.
Add conditional steps
You can add conditional steps in the editor and the step editing pane,
To add conditional steps:
-
Add a condition in one of the following ways:
- Type If or Smart 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 Add step button
, and select from the Conditions options.
-
Specify the step target:
-
Click the Parameter, AI Object, or Current screen button to specify which to check.
Note:
-
The Current screen option is available for Smart If only.
-
When you switch between these options, the step is reset to a template. To undo, use CTRL+Z.
-
-
To check a parameter, select an existing parameter from the list or click + New parameter to create one.
To check an object, select the Object class and specify an object description, as described in Specify object identification details.
-
-
Edit the If or Smart If step's condition, to check any of the conditions described in Types of condition steps.
You can type the step in the editor or compose it in the step editing pane. For syntax details, see If/Else steps.
-
Edit steps inside the condition block. For details, see Manually add and edit steps.

