> ## 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.

# Mouse Click On Elements

> Select elements by CSS selector, calculate screen position, and click with human-like movement

The Mouse Click On Elements command (Command Type: 2) selects elements by CSS selector, calculates their position on screen, moves the mouse there, and clicks with configurable randomness to simulate human behavior.

## Command Type

**Command Type ID:** 2

## Parameters

| Parameter                  | Type    | Description                                                                      | Required |
| -------------------------- | ------- | -------------------------------------------------------------------------------- | -------- |
| **selector**               | string  | CSS selector to identify the element(s) to click                                 | Yes      |
| **scrollable**             | boolean | If `true`, attempts to scroll the element into the viewport before clicking      | Yes      |
| **spread**                 | number  | Randomness of mouse movement within the element (0–100)                          | Yes      |
| **timeout**                | number  | Timeout for the command in milliseconds                                          | Yes      |
| **filters**                | Filters | Optional criteria to refine element selection                                    | No       |
| **selectorChangedOnClick** | boolean | Whether the selector changes after clicking                                      | No       |
| **viewportAreaPercentage** | number  | Portion of the viewport considered as the active area (0–100). Defaults to `100` | No       |

### Filters Object

| Field                | Type            | Description                                                   | Required |
| -------------------- | --------------- | ------------------------------------------------------------- | -------- |
| **className**        | string          | Filter elements by class name                                 | No       |
| **includeInnerText** | Array of string | Include only elements whose inner text contains these strings | No       |
| **excludeInnerText** | Array of string | Exclude elements whose inner text contains these strings      | No       |

## Usage Examples

### Click a Button

```json theme={null}
{
  "command": "mouse-click-on-elements",
  "params": {
    "selector": "button.accept",
    "scrollable": true,
    "spread": 20,
    "timeout": 10000
  }
}
```

### Click with Inner Text Filter

```json theme={null}
{
  "command": "mouse-click-on-elements",
  "params": {
    "selector": ".menu-item",
    "scrollable": false,
    "spread": 10,
    "timeout": 5000,
    "filters": {
      "includeInnerText": ["Football"]
    }
  }
}
```

## Common Use Cases

* **Human-Like Clicks**: Simulate natural mouse movement and click to avoid detection
* **Conditional Clicks**: Click only elements matching a specific text
* **Scrollable Targets**: Click elements that are below the fold

## Related Commands

* [Move Mouse](/stream/commands/interaction/move-mouse) - Move mouse before clicking
* [Click by Javascript](/stream/commands/browser/click-by-javascript) - Programmatic JS click (no mouse simulation)
