Skip to main content

Advanced Actions

Human-like mouse movement, Cloudflare bypass, and running custom JavaScript.

clickHuman

Click an element using a realistic curved mouse path. Use this on sites that detect and block regular automated clicks.

Value: string (CSS selector)

<button id="login-btn">Log in</button>
[
{ "clickHuman": "#login-btn" }
]

Fast mode — starts the mouse path closer to the target:

[
{ "clickHuman": ".submit-button", "options": { "mode": "fast" } }
]

Options

OptionTypeDefaultDescription
modestringSet to "fast" to start the mouse path closer to the target
offsetXnumber0Horizontal offset from element center
offsetYnumber0Vertical offset from element center
note

A visible cursor animation plays on screen during the movement.


hoverHuman

Hover over an element with a realistic mouse path without clicking. Useful for triggering tooltips or dropdown menus on sites that detect automated behavior.

Value: string (CSS selector)

<a class="nav-item">Products</a>
[
{ "hoverHuman": ".nav-item" }
]

Options

OptionTypeDefaultDescription
offsetXnumber0Horizontal offset from element center
offsetYnumber0Vertical offset from element center

byPassCloudflare

Detect and click the Cloudflare "Verify you are human" checkbox using a realistic mouse movement.

Value: true

tip

The Cloudflare Turnstile widget takes a moment to load after the page opens. Add a wait or waitForEvent: "networkidle" before this action to give it time to appear.

[
{ "byPassCloudflare": true }
]

Options

OptionTypeDefaultDescription
offsetXnumber0Fine-tune click position (horizontal)
offsetYnumber0Fine-tune click position (vertical)

evaluate

Run arbitrary JavaScript on the page. Runs in the MAIN world so it has full access to page variables, window, and any JS frameworks loaded on the page.

Use return to send a value back.

Value: string (JavaScript expression or function body)

[
{ "evaluate": "return document.title" }
]

Returns:

{ "success": true, "data": "My Page Title" }

Save the result to a cache key for use in later actions:

[
{
"evaluate": "return document.querySelectorAll('.item').length",
"options": { "save": "itemCount" }
}
]

Modify the page:

[
{ "evaluate": "document.body.style.zoom = '80%'" }
]

Read a framework variable:

[
{
"evaluate": "return JSON.stringify(window.__NEXT_DATA__.props)",
"options": { "save": "nextData" }
}
]

Options

OptionTypeDefaultDescription
savestringSave the return value under this cache key
pushstringPush the return value into a cached array

Example: Human-Like Login

[
{ "openNewTab": "https://example.com/login" },
{ "wait": 2000 },
{ "clickHuman": "input[name=email]" },
{ "fill": ["input[name=email]", "user@example.com"], "options": { "delay": 80 } },
{ "wait": 500 },
{ "clickHuman": "input[name=password]" },
{ "fill": ["input[name=password]", "mypassword"], "options": { "delay": 60 } },
{ "wait": 1000 },
{ "clickHuman": "button[type=submit]", "options": { "mode": "fast" } },
{ "waitForElement": ".dashboard" }
]

Example: Cloudflare-Protected Site

[
{ "openNewTab": "https://protected-site.com" },
{ "wait": 4000 },
{ "byPassCloudflare": true },
{ "wait": 3000 },
{ "waitForElement": "body", "options": { "timeout": 15000 } },
{ "screenshot": "viewport" }
]