Skip to main content

Overview

The Click node (Action node) performs mouse interactions on web page elements. It supports clicking, double-clicking, right-clicking, hovering, and drag-and-drop operations with advanced waiting and retry capabilities.

Actions

click

Single click on an element.
button
string
default:"left"
Mouse button to click.Options:
  • left - Left mouse button
  • right - Right mouse button
  • middle - Middle mouse button

doubleClick

Double-click on an element.
delay
number
Delay in milliseconds after the double-click completes.

rightClick

Right-click on an element (context menu).

hover

Hover the mouse over an element.
delay
number
Delay in milliseconds to maintain hover state.

dragAndDrop

Drag an element to a target location.
targetSelector
string
Target element selector to drag to. Use this OR targetX/targetY coordinates.
targetSelectorType
string
default:"css"
Selector type for target element.
targetX
number
Target X coordinate (alternative to targetSelector).
targetY
number
Target Y coordinate (alternative to targetSelector).

Configuration

selector
string
required
Element selector to interact with. Supports variable interpolation: ${data.buttonSelector}
selectorType
string
default:"css"
Type of selector.Options:
  • css - CSS selector
  • xpath - XPath selector
  • text - Text content
  • getByRole - ARIA role
  • getByText - Exact text match
  • getByLabel - Label text
  • getByPlaceholder - Placeholder text
  • getByTestId - Test ID attribute
selectorModifiers
object
Advanced selector modifiers for precise element targeting.Properties:
  • nth: Select nth element (0-based, -1 for last)
  • filterText: Filter by text content
  • filterTextRegex: Treat filterText as regex
  • filterSelector: Filter by child selector
  • chainSelector: Scoped sub-query
timeout
number
default:"30000"
Maximum time in milliseconds to wait for the element.
failSilently
boolean
default:"false"
If true, errors don’t stop workflow execution.

Advanced Features

Waiting

waitForSelector
string
Wait for another element before/after the action.
waitForUrl
string
Wait for URL to match pattern (supports regex).
waitForCondition
string
Wait for JavaScript condition: document.querySelector('.loaded')
waitAfterOperation
boolean
default:"false"
Execute waits after the action instead of before.

Retry Logic

retryEnabled
boolean
default:"false"
Enable automatic retry on failure.
retryCount
number
default:"3"
Number of retry attempts.
retryDelay
number
default:"1000"
Delay between retries in milliseconds.
retryDelayStrategy
string
default:"fixed"
fixed or exponential backoff.

Examples

Basic Clicking

{
  "type": "action",
  "data": {
    "action": "click",
    "selector": "button.submit",
    "selectorType": "css"
  }
}

Advanced Selectors

{
  "type": "action",
  "data": {
    "action": "click",
    "selector": "button",
    "selectorType": "getByRole",
    "selectorModifiers": {
      "filterText": "Submit"
    }
  }
}

Drag and Drop

{
  "type": "action",
  "data": {
    "action": "dragAndDrop",
    "selector": ".draggable-item",
    "targetSelector": ".drop-zone",
    "selectorType": "css",
    "targetSelectorType": "css"
  }
}

With Retry

Resilient Click
{
  "type": "action",
  "data": {
    "action": "click",
    "selector": "button.dynamic-button",
    "retryEnabled": true,
    "retryCount": 3,
    "retryDelay": 2000,
    "retryDelayStrategy": "exponential",
    "waitForSelector": ".loading",
    "waitAfterOperation": true
  }
}

Hover with Delay

Menu Hover
{
  "type": "action",
  "data": {
    "action": "hover",
    "selector": ".dropdown-trigger",
    "delay": 1000,
    "waitForSelector": ".dropdown-menu",
    "waitAfterOperation": true
  }
}

Notes

The node automatically scrolls to elements before clicking if the global scrollThenAction setting is enabled.
For elements that appear dynamically, use waitForSelector or enable retry logic to ensure the element is ready.
Drag and drop operations require either a targetSelector or both targetX and targetY coordinates.

Common Patterns

Click with Wait

{
  "action": "click",
  "selector": "button.submit",
  "waitForUrl": ".*success.*",
  "waitAfterOperation": true,
  "timeout": 10000
}

Conditional Click

{
  "action": "click",
  "selector": "button.optional",
  "failSilently": true,
  "timeout": 5000
}

Build docs developers (and LLMs) love