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

# browser_click

> Click an element by ref with real mouse events.

Click an element by ref with real mouse events. Also hover (hover:true) and drag (dragTo).

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="ref" type="string" required>
  Element ref from browser\_snapshot, e.g. "e12"
</ParamField>

<ParamField body="button" type="enum">
  One of: `left`, `right`, `middle`.
</ParamField>

<ParamField body="count" type="integer">
  2 for double-click Range: 1 to 3.
</ParamField>

<ParamField body="modifiers" type="enum[]">
  Items: `Shift`, `Control`, `Alt`, `Meta`.
</ParamField>

<ParamField body="hover" type="boolean">
  Only move the mouse over the element
</ParamField>

<ParamField body="dragTo" type="string">
  Drag from ref to this ref
</ParamField>

## Example

```json theme={null}
{
  "tabId": 1234,
  "ref": "e12"
}
```

```json Hover theme={null}
{
  "tabId": 1234,
  "ref": "e12",
  "hover": true
}
```

```json Drag one element onto another theme={null}
{
  "tabId": 1234,
  "ref": "e12",
  "dragTo": "e30"
}
```
