Adding a Validation to an Action
How to
- In the Expanded view, use the mouse to hover over the clip element.
-
Click the Valdiations
node on the Add toolbar.When you do so, a new Validation form is added.
- To open an action in the lower panel, select and then double-click it.
- Select a validation from the Command drop-down. The Command drop-down presents the list of available validations (prefixed with
verify
...). Subsequent parameters depend upon the wait selection made here.In the default validation (above)verifyElementPresent
, Locator is the only parameter of the selected command that requires definition. As you choose different options in the Command drop-down, different parameters appear underneath it. - Where required, enter a locator. You can copy and paste a Locator from the Input field of a given action.Note: Locators are unique characteristics that identify a specific element or object for the given action. The form of the Locator generally varies according to the type of validation. For a browser or app action it may be the name of an element on the page such as
submitButton
orclassname=PieceImageView[13]
. - Select a Failure Action from the Errors should: drop-downThe Errors should drop-down specifies what failure action to take when the validation condition is not met.
- If the failure action is set to be recorded only, the validation outcome will be recorded in the result, and the test composition will continue whether the validation passes or fails.
- If the failure action is set to fail the Clip, the test composition will stop if the validation fails.
- If the failure action is set to Honor the (Browser or App) Action or Message setting, the validation inherits the parent setting from the action/message.
- Where required, specify a pattern to match.Many validations compare text by matching the pattern of some text on the page in order to determine if that page is correct. The following pattern match types are offered:
- Exact Match – matches against the string exactly
- Glob – matches against a pattern using Java glob notation.
- RegEx – matches against a regular expression using Java regular expression notation.
verifyElementPropertyValue
. - Optionally, double-click the Action to open it in the lower panel in order to customize its Success/Error messages. Click Show/hide to add or revise Success/Error messages for display in results. The log message fields specify custom messages to show in Result Details when the validation passes or fails.
What you should see
