Pinch script action

Pinch action

This action applies to Mobile Device scripts only. It is only supported in the Mobile and Chrome agents.

In Mobile Device scripts, the Pinch action simulates moving thumb and finger toward each other on a mobile device screen to zoom out the display; for example, to make text smaller or to display a larger, less detailed area of a map.

In some websites, the pinch action is disabled, therefore you cannot record pinch actions in those sites.

The following settings can be edited for this action.
Pinch settings

  • Target Window – The window where the pinch occurred

  • Locators – The element on the page where the pinch occurred

  • Coordinates – The start and end points of the pinch, measured from the upper left-hand corner of the element.

    The Start Coordinates record the X and Y coordinates of the two points on the screen where, for example, the thumb and forefinger rest before beginning the pinch. The End Coordinates record the points where the pinch ends. In each Coordinates row, the first two fields are the X and Y coordinates, respectively on the left side; the third and fourth fields are the X and Y coordinates, respectively, on the right side.

Change a target window setting

  1. If necessary, click the right-facing right arrow below the timeline to show the action settings.

  2. Edit the Target Window appropriately.

Define locators

For more information, see Element locators.

Add a locator

  1. Click Add icon at the far right of the Locators area. A new row is added.
    Add a locators row

  2. Select the type of Locator information to use — CSS or DOM — from the drop-down menu for the Locator to change.

  3. Enter the appropriate Locator information in the text field.

  4. Repeat to create new additional locators.

Change existing locator settings

  1. Scroll down until you see the Locator to change.

  2. Enter the new Locator information.

Delete a locator

  1. Click located on the right of the locator to delete.

Change the coordinates

  1. In the Start Coordinates row, enter the new pixel values for the left-side X and Y coordinates and right-side X and Y coordinates for the start of the pinch.
    Pinch coordinates

  2. In the End Coordinates row, enter the new pixel values for the left-side X and Y coordinates and right-side X and Y coordinates for the end of the pinch.