Adding a Validation to a Browser Action

Document created by Chris Sommerstad Employee on Jul 21, 2017
Version 1Show Document
  • View in full screen mode
  1. Select and then double-click the browser action to edit in the lower panel.
  2. In the Browser Action Editor, click Validations in the leftmost panel.
  3. Click the green Plus (+) icon in the middle panel.

A new validation form will appear in the workspace with the default values.

Choose a command from the command drop-down menu to describe the validation. CloudTest has all of the WebUI validations that Selenium has plus the ability to extend via JavaScript using Custom Validations. In this example, we will add a validation to verify that an element is present on the page (using the default, verifyElementPresent).

Some validation commands have parameters. The verifyElementPresent command has a Locator parameter. The parameters will appear beneath the command option when the command is selected.

Type in a value for the Locator, such as the id of the element, or click the Locator Tool and use it to select an element in the web page.

All validations have a Failure Action option.

  • If the failure action is set to Record in Results 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 Halt the Composition, the Test Composition will stop if the validation fails.
  • If the failure action is set to Honor the Browser Action setting, the validation inherits the parent setting from the Browser Action (this can be found in the Error Handling section by clicking the Browser Action item at the top of the Properties list).

Attachments

    Outcomes