Page tree
Skip to end of metadata
Go to start of metadata

Last updated: May 26, 2020 14:47

Touch actions used to scroll or swipe support pixel coordinates. Learn how to convert from relative to absolute coordinates.

The coordinates’ values in the device gestures operations, such as Touch and Swipe, can be either pixel coordinates or percentage coordinates. Below you can find the formula for converting the pixels coordinates to percentage coordinates:


For example, for a Nexus 5 device with the 1080 x 1920 resolution, the following commands will perform the same operation:


Touch by coordinate in pixels:


Touch by coordinate in percentage:

Nice to know:

  1. The Resolution Width and Resolution Height values can be retrieved by using the Device info function.
  2. (0%,0%) is the top left corner.
  3. (100%,0%) is the top right corner.
  4. (0%,100%) is the bottom left corner
  5. (100%,100%) is the bottom right corner