Skip to main content
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

ParameterTypeDescriptionRequired
selectorstringCSS selector to identify the element(s) to clickYes
scrollablebooleanIf true, attempts to scroll the element into the viewport before clickingYes
spreadnumberRandomness of mouse movement within the element (0–100)Yes
timeoutnumberTimeout for the command in millisecondsYes
filtersFiltersOptional criteria to refine element selectionNo
selectorChangedOnClickbooleanWhether the selector changes after clickingNo
viewportAreaPercentagenumberPortion of the viewport considered as the active area (0–100). Defaults to 100No

Filters Object

FieldTypeDescriptionRequired
classNamestringFilter elements by class nameNo
includeInnerTextArray of stringInclude only elements whose inner text contains these stringsNo
excludeInnerTextArray of stringExclude elements whose inner text contains these stringsNo

Usage Examples

Click a Button

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

Click with Inner Text Filter

{
  "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