> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# tap

> Tap an element identified by description or percent-pair coordinates.

Taps a target. The simplified form takes a single string. Provide a
natural-language description or a percent pair like `"50%, 50%"`.

## Parameters

| Parameter           | Type                 | Required | Description                                                     |
| ------------------- | -------------------- | -------- | --------------------------------------------------------------- |
| `on`                | `string`             | No       | Target description or percent pair.                             |
| `longPress`         | `boolean`            | No       | Hold the tap instead of a quick press.                          |
| `longPressDuration` | `number`             | No       | Hold duration in milliseconds when `longPress` is set.          |
| `iterations`        | `number`             | No       | Number of taps to issue.                                        |
| `tapDelay`          | `number`             | No       | Milliseconds between taps when `iterations` > 1.                |
| `offset`            | `string \| { x, y }` | No       | Pixel offset from the resolved target (`"x, y"` or `{ x, y }`). |
| `saveAs`            | `string`             | No       | Variable to store this step's return value on `env.<name>`.     |
| `retries`           | `number`             | No       | Times to retry the step on failure before failing the test.     |
| `skipped`           | `boolean`            | No       | Skip this step at execution time.                               |

## Shorthand

Target as a single string.

```yaml theme={null}
- tap: the Add to cart button
```

## Examples

```yaml theme={null}
- tap: "50%, 50%" # tap the center of the screen
```

```yaml theme={null}
- tap:
    on: the kebab menu in the top-right
    longPress: true
    longPressDuration: 1500 # hold for 1.5s
```

## Related

* [Test format](/core-concepts/test-format)
