Skip to main content

If Mobile Element Exists

Command description​

Check whether the specified element exists on the mobile device and execute the indented child commands when the selected condition is met. For example, check for a login element before running the login commands.

Command Input Parameters​

input parametersInput parameter typeDescription
Mobile Device ObjectPhoneConnected mobile-device object
Mobile ElementstrCaptured mobile element UID, not its name or runavelo-ui-id
Element StateenumExists, Does Not Exist
Element Wait TimeoutnumberMaximum time to wait for the element to appear or disappear, in seconds

Command Output Parameters​

None

Element status​

  • Exists: Wait for the element to appear, up to the configured duration. Execute the child commands if it appears.
  • Does Not Exist: Wait for the element to disappear, up to the configured duration. Execute the child commands if it is absent.

Type definition reference​

Example​

tip

To capture and edit element attributes, see Capture Mobile Elements.

Enable Developer options on the mobile device, then connect it to the computer with a USB cable. See Connect Mobile Device

FAQ​

See Mobile Automation FAQ