Skip to main content

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 parametersInput parameter typeDescription
Mobile Device ObjectPhoneConnected mobile object
X Coordinateint or strX coordinate relative to the upper-left corner of the mobile screen
Y Coordinateint or strY coordinate relative to the upper-left corner of the mobile screen
Click MethodenumSingle Click, Long Press

Command Output Parameters

None

Type definition reference

Tips on using coordinates

  • x coordinate and y coordinate are 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_center and phoneElement.y_center to 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

FAQ

See Mobile Automation FAQ