Tap Mobile Screen
Command description
Tap a position on the mobile screen. The upper-left corner is (0, 0), and the lower-right corner is (screen width, screen height).
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Mobile Device Object | Phone | Connected mobile object |
| X Coordinate | int or str | X coordinate relative to the upper-left corner of the mobile screen |
| Y Coordinate | int or str | Y coordinate relative to the upper-left corner of the mobile screen |
| Click Method | enum | Single Click, Long Press |
Command Output Parameters
None
Type definition reference
Tips on using coordinates
x coordinateandy coordinateare pixel coordinates relative to the upper left corner of the mobile phone screen- If you obtained an element with Get Mobile Element, use
phoneElement.x_centerandphoneElement.y_centerto tap its center. - If you need a more natural click position, you can use
phoneElement.x_random,phoneElement.y_random
Example
tip
Enable Developer options on the mobile device, then connect it to the computer with a USB cable. See Connect Mobile Device