Skip to content

How do I perform double tap action based on the coordinate values in a Mobile App

This example demonstrates how to perform double tap action based on the coordinate values.

In the solution shown below, you will see that double tap action is performed on the PDF image in HICC using the "doubleTapAt" command in order to Zoom In by providing the coordinate values in the "Target" field.

Solution:

# Command Target Value
Double Tapping on the PDF image
1 doubleTapAt 360,740  

Note: In the HICC mobile app, the double tap action to Zoom In the PDF image works only for Android.

Tips, Tricks, Gotchas & Best Practices:  

  • You can get the coordinates from Appium Inspector.
  • The screen size varies for every device hence the coordinates of one device may not work for the other. You can use the storeElementLocation command to get the coordinates for the required element and call it in the "doubleTapAt" command.
  • As an alternative to "doubleTapAt" command, you can use the doubleTap command to perform the doubleTap action based on the locator.
  • As a best practice, you are encouraged to validate visibility of any element that is expected to be displayed after the doubleTap action using assertVisible, verifyVisible or waitForVisible commands.

Feedback and Knowledge Base