Spotted something off?Report on Discord
guides
Click Action
Simulate a click on a specific page element inside a real browser session using a CSS selector or XPath.
Updated May 28, 2025
Simulate a click on a specific element on a webpage using a CSS selector or XPath within a browser session.
Command
"click"
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cssSelector |
string | Yes | CSS selector or XPath of the element to click. |
wait |
number | No | Wait for X seconds after clicking. |
waitForSelector |
string | No | Wait for a specific element to appear after the click. |
when |
string | No | Lifecycle phase to run the action: beforelaunch, beforeload, afterload, or after_captcha. Default is afterload. |
ignoreErrors |
boolean | No | Set to true to continue even if an error occurs. |
Example
bash12 lines
Related concepts
Go deeper in the Scrappey knowledge base:
- Playwright β the automation engine behind browser actions
- Headless browsers β driving a real browser to scrape