# tapOn

Taps on an element using a [selector](/creating-tests/test-step-selectors.md).

## Options

Tap on text

```yaml
- tapOn:
    text: "some text"
```

Tap on an element with ID

```yaml
- tapOn:
    id: "some-id"
```

Tap on a point in the top left corner of the screen

```yaml
- tapOn:
    point: 10%,10%
```

Tap on a point in the center of the screen

```yaml
- tapOn:
    point: 50%,50%
```

### Repeating Taps

If you need to tap multiple times, make use of the `repeat` option:

```yaml
- tapOn:
    id: "some-id"
    repeat: 4
```

By default, taps will occur 100 milliseconds apart; you can change this using the `delay` option:

```yaml
- tapOn:
    id: "some-id"
    repeat: 2
    delay: 300
```

*Note: for a double tap, you may prefer the* [*doubleTa*](/creating-tests/commands/tapon.md)[*pOn*](/creating-tests/commands/tapon.md) *command*

### Retry Tap If No Change

If the test runner does not detect a view change after an `tapOn` command, then it will automatically tap again.&#x20;

On Android, this sometimes manifests as a double tap which can cause issues in your test steps.

You can disable this behaviour by setting the `retryTapIfNoChange` option to `false`:

<pre class="language-yaml"><code class="lang-yaml"><strong>- tapOn:
</strong>    id: "submit-button"
    retryTapIfNoChange: false
</code></pre>

### Wait to Settle Timeout

By default, the runner will dynamically wait for any animations to finish before executing a command. This ensures that the screen is stable, and any content is loaded, before proceeding. The argument `waitToSettleTimeoutMs` will force override the wait after a configured number of milliseconds.&#x20;

However, in some cases, this might be undesirable behaviour such as with animation-heavy apps.&#x20;

<pre class="language-yaml"><code class="lang-yaml"><strong>- tapOn:
</strong>    id: "submit-button"
    waitToSettleTimeoutMs: 500 # waits 500ms for screen to be settle before executing
</code></pre>

## Related Commands

[longPressOn](/creating-tests/commands/longpress.md)

[doubleTapOn](/creating-tests/commands/tapon.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moropo.com/creating-tests/commands/tapon-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
