Add verification steps

Add verification steps to check the existence or value of objects in your application. You can add verification steps in the editor, the step editing pane, and from the AI Inspect window.

Types of verification steps

Verification steps can check the existence, value, or state of objects in your application. If the condition specified in the Verify step is not met, the step fails.

Verify the existence of an object

The verification 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.

Verify the value of an object

For AI objects with a string value, such as button, text box, field, or input, you can add a verification step that checks the value of the object.

You can verify whether the value is empty or not, and whether it is or isn't equal, containing, or within a specified string.

  • The value of a button is the text on the button.

  • The value of a text box and other input fields is the text inside the box.

Verify the state of an object

For AI objects such as checkboxes, radio buttons, and toggles, you can add a verification step that checks the state of the object.

Depending on the type of object, you can verify whether the object is checked, not checked, selected, not selected, on, or off.

Back to top

AI objects and property-based objects

Verify steps on AI objects and property-based objects work differently.

Verify steps on AI objects

The existence of AI objects is checked only in the visible area of the application.

By default, Verify steps do not scroll the application to locate the object. This ensures that the application remains in the same state at the end of the step. If necessary, you can override this behavior using the step settings. For details, see Customize settings.

Verify steps on property-based objects

The existence of property-based objects can be detected anywhere on the application page.

Therefore, the Verify step does not scroll the application to make the object visible.

Back to top

Add a verification step

You can add verification steps in the editor, the step editing pane, and from the AI Inspect window.

To add a verification step in the editor:

  1. Click the Add step button .

  2. Select the Verify option. The step template is added to the script.

  3. Modify the template following the syntax rules described in Step syntax.

To add a verification step in the step editing pane or during inspection: 

  1. Select an object for your step:

    • During inspection, click an object highlighted by the inspection.

      A pop-up dialog box with the suggested step and object description opens.

    • In the step editing pane, select an Object class from the drop-down list.

  2. Select the Verify action.

  3. Select which condition the step checks:

    Condition Description
    Exists

    (Default) The step succeeds if the object exists.

    Does not exist

    The step succeeds if the object does not exist.

    The object's state.

    One of: 

     checked, not checked, on, off, selected, not selected.

    The step compares the object's state with the state you specify, and fails if the condition is not met.

    The available states depend on the object type.

    Value of

    The step compares this object's value with the value you specify.

    During inspection, click Edit step in pane and continue in the pane that opens.

    To configure the value to compare:

    1. From the condition drop-down list, select Is, Is not, Contains, Does not contain, or Is within, In not within, Is empty, Is not empty.

    2. Enter a constant value or click the icon to use an input parameter.

  4. To add the step to the script from inspection, click Add step.

Back to top

Set step configuration options

In addition to specifying what the verification step checks, you can set the following options in the step editing pane:

  • For a step verifying an object's existence, you can define a Timeout in seconds for how long to wait for the step's condition to be met. (Default:20)

  • If you want the test run on the current application to stop when the verification step fails, select Stop test run upon failure. A Stop indicator is added to the step.

    If you didn't select the option, the step failure is reported but the run continues. (Default: Run does not stop)

  • To store the verification result in an output parameter, click Set verification result into output parameter and select the output parameter. The result can be True or False. (This option is not available when you add the step while inspecting the application).

Back to top

See also: