A Validate action stops execution of a script if a specified text string is present or absent, as defined, in a specified step; or if a specific HTTP status code is not returned.
Best practice is to add a Validate action at the end of each step to confirm that the script executed properly.
There are two validation modes:
Match against all content loaded during this step – Validate that the text is present in any action of the step.
Match against an element – Validate that the text is present in a single, specified element of the step. If you select this validation mode, you must define the target window and the element locators. The Target Window field and the Locators area are only displayed if this mode is selected.
The Validate action checks for the Match Text string in the URL and the content for all objects downloaded for the page.
You can use evaluation syntax for the Match Text field.
There are also two validation options:
Fail the script if the text matches the Match Text in the specified mode.
Interpret the specified text string as a regular expression.
If you need to validate against multiple criteria, create one Validate action for each criterion. The script will only continue if all Validate actions are successful.
Change a Validate action
Select a Validate action in the interactive timeline.
Click located below the interactive timeline to show the action settings.
Select the criteria for the validation.