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 parameters | Input parameter type | Description |
|---|---|---|
| Mobile Device Object | Phone | Connected mobile-device object |
| Mobile Element | str | Captured mobile element UID, not its name or ms-rpa-id |
| Element State | enum | Exists, Does Not Exist |
| Element Wait Timeout | number | Maximum 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