> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Click element (detailed)

> Reference for the `Click element (detailed)` schema.

## Referenced In

* [click](/reference/schemas/click)
* [Find element (detailed)](/reference/schemas/find-element-detailed)

## Fields

| Field            | Type                                                                                                                                     | Description                                                                                                                                                                                                                                                                                                               | Default |
| :--------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------ |
| button           | string                                                                                                                                   | Optional. Kind of click to perform. Accepted values: `left`, `right`, `middle`                                                                                                                                                                                                                                            | —       |
| duration         | integer                                                                                                                                  | Optional. How long to hold the press, in milliseconds. A long-press (touch-and-hold) on mobile app surfaces; press-and-hold of the button on desktop apps and browsers. Omit for a normal click. Minimum: 1                                                                                                               | —       |
| surface          | one of: - string - object([Browser surface](/reference/schemas/browser-surface)) - object([App surface](/reference/schemas/app-surface)) | Optional. The browser window/tab or app window this step acts on. Omit to act on the active surface — the most recently opened, focused, or explicitly targeted surface, whatever its kind. Specifying a surface switches the active surface for the steps that follow. App surfaces use the object form (\{ "app": … }). | —       |
| elementText      | string                                                                                                                                   | Optional. Display text of the element to click. If combined with other element finding fields, the element must match all specified criteria.                                                                                                                                                                             | —       |
| selector         | string                                                                                                                                   | Optional. Selector of the element to click. If combined with other element finding fields, the element must match all specified criteria.                                                                                                                                                                                 | —       |
| elementId        | string                                                                                                                                   | Optional. ID attribute of the element to click. Supports exact match or regex pattern using /pattern/ syntax.                                                                                                                                                                                                             | —       |
| elementTestId    | string                                                                                                                                   | Optional. data-testid attribute of the element to click. Supports exact match or regex pattern using /pattern/ syntax.                                                                                                                                                                                                    | —       |
| elementClass     | one of: - string - array of string                                                                                                       | Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes.                                                                                                                                         | —       |
| elementAttribute | object                                                                                                                                   | Optional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence.                                                                                                       | —       |
| elementAria      | string                                                                                                                                   | Optional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax.                                                                                                                                                                                   | —       |

## Examples

```json
{
  "button": "left",
  "duration": 42,
  "surface": "chrome",
  "elementText": "example",
  "selector": "example",
  "elementId": "example",
  "elementTestId": "example",
  "elementClass": "example",
  "elementAttribute": {},
  "elementAria": "example"
}
```