If using an Accessor

In CloudTest, an accessor makes an action’s return value usable—as a simple output, something to wait on, validate, or to use in a property set. The accessors of an action can be used in the test for various purposes.

For mobile apps and browser UIs, an Accessor option also appears. When Accessor is selected in the If drop-down, the comparison syntax shown on the right appears.

How to

  1. With if Accessor selected, specify a mobile app or browser action accessor to use by clicking from the drop-down and then enter the Locator to use.
    • If the Accessor takes a Locator, enter the Locator to use.
    For example, in the shot above if the Locator for the Accessor, elementText, returns a value that is equal to the Case provided for a given action, then that action is used in the switch.Note: Ifs using an Accessor are covered in the following section on Graphical If Comparisons.
    • Some Accessors have no parameters, so there's nothing to enter. For example, isDevicePortrait has no parameters.
    • Some Accessors have more than one parameter, and values for each field must be entered.

  2. Specify a predicate. For example, equal to.
  3. Repeat the steps to the right of the predicate symbol you chose. All the same fields are available on the right as were available on the left.

What you should see

For example, in the shot above if the Accessor, elementTime, returns a value that is equal to the Constant provided, the comparison passes.