Tap script action

Tap action

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

In Mobile Device scripts, the Tap action defines where on a page to record a mouse click that simulates tapping a mobile device screen with a fingertip. It is inserted when you click an element, such as clicking a link to navigate or selecting a field.

When you set Touch to OFF in the Mobile Recorder, clicking in the Mobile Recorder screen is recorded as a Click instead of as a Tap.

Select a Tap action in the timeline to display the settings that can be edited:

  • Target Window – The window where the click occurs.

  • Locators – The element(s) to be clicked.

  • Pixel – The X and Y coordinates of the click on the element, measured from the upper left-hand corner of the element.

Tap settings

Change a target window setting

  1. Change the value in the Target Window field.

Define locators

Add a locator

  1. Click the add icon Add icon on the right side of the Locators area. A new row is added.
    Add a locators row

  2. Select CSS or DOM from the drop-down list.

  3. Enter the new Locator information.

Change existing locator settings

  1. Scroll down to the Locator to change.

  2. If necessary, change the selection — CSS or DOM — in the drop-down list.

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

Delete a locator

  1. Click to the right of the Locator to delete.

You cannot undo a deletion. You are not prompted to confirm the deletion.

Change the tap location

The location of the Tap is defined by the number of pixels from the upper left corner of the element clicked.

  1. In the first text field of the Pixel area, enter the new pixel value for the X coordinate.

  2. In the second text field, enter the new pixel value for the Y coordinate.