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

# Tap On Elements

> Select elements by CSS selector, calculate screen position, and tap

The Tap On Elements command (Command Type: 5) selects elements by a given CSS selector, calculates their position on screen, and taps on them.

## Command Type

**Command Type ID:** 5

## Parameters

| Parameter                  | Type    | Description                                                                             | Required |
| -------------------------- | ------- | --------------------------------------------------------------------------------------- | -------- |
| **selector**               | string  | The CSS selector to identify the element(s) to tap                                      | Yes      |
| **timeout**                | number  | The timeout for the command in milliseconds                                             | Yes      |
| **filters**                | Filters | Optional filters to refine the elements to tap                                          | No       |
| **viewportAreaPercentage** | number  | Percentage of the viewport area (0–100) used to decide which part of the element to tap | No       |

### Filters Object

| Field                | Type            | Description                                                             | Required |
| -------------------- | --------------- | ----------------------------------------------------------------------- | -------- |
| **className**        | string          | Filter elements by a specific class name                                | No       |
| **includeInnerText** | Array of string | Include elements whose inner text contains any of the specified strings | No       |
| **excludeInnerText** | Array of string | Exclude elements whose inner text contains any of the specified strings | No       |

## Usage Examples

### Tap a Button

```json theme={null}
{
  "command": "tap-on-elements",
  "params": {
    "selector": "button.submit",
    "timeout": 10000
  }
}
```

### Tap with Inner Text Filter

```json theme={null}
{
  "command": "tap-on-elements",
  "params": {
    "selector": ".list-item",
    "timeout": 10000,
    "filters": {
      "includeInnerText": ["Accept"]
    }
  }
}
```

## Related Commands

* [Run App](/stream/commands/android/run-app) - Launch the app before tapping
* [Mouse Click On Elements](/stream/commands/interaction/mouse-click-on-elements) - Browser equivalent
