Verify element in a smartphone test

Check that an element of the app is, or is not, displayed, clickable, enabled, or present, and fail the smartphone test when it is not.

Verify the state of an element in the app: the confirmation screen is displayed, the Continue button is enabled, the loading spinner is gone. The step waits until the condition is met and fails if it never is within the waiting time. This is the main verification step for smartphone tests, and a robust alternative to fixed delays.

Parameters

ParameterRequiredDescription
Target elementYes, unless a manual selector is setNatural-language description of the element to verify.
Manual selectorNoXPath or CSS selector, used when AI is disabled or as the saved selector.
ConditionYesis or is not. "is not" sets reverse: true on the chosen state.
StateYesThe state to check. Default: displayed. exist is labeled "present" in the builder: the element is in the UI tree, visible or not.
Max. waiting timeNoHow long to wait for the condition before failing, in seconds.
Ignore error on this stepNoThe run continues with the next step if this one fails. Default: off.

The four states:

  • displayed: the element is visible on the screen.
  • clickable: the element is visible and can receive a click or tap.
  • enabled: the element is active (not disabled).
  • present: the element exists in the UI tree, even if hidden.

Results and metrics

  • Timing: start, end, and duration (in seconds). The duration shows how long the condition took to become true, a useful signal in itself.
  • Status: success as soon as the condition is met, failed if the waiting time runs out.
  • Screenshot: captured for the verified state.

What's next?

Verify with AI

Verify whole-screen states in plain language instead of one element

Wait for delay

Pause for a fixed time when there is nothing to observe

Last updated on