Click Element
AI-generatedSummary
Clicks the first element matching a CSS selector or XPath on the current page of a remote Playwright browser session, then returns the success flag, selector used and resulting page URL.
Inputs
- selectorType — CSS Selector (default) or XPath. Decides which of the two selector fields is read.
- selector (required) — CSS selector of the element to click (shown when Selector Type is CSS). Only the first match is clicked.
- xpath (required) — XPath expression of the element to click (shown when Selector Type is XPath). Only the first match is clicked.
- browser — Browser type used to connect: Firefox (default) or Chrome (chromium). Only applies when a new session is created.
- browserEndpoint — Remote browser WebSocket endpoint (e.g. ws://playwright:3000). If empty, the endpoint of the existing session or the previous Playwright node is used. The node errors if none can be found.
- leaveSessionOpen — Keep the browser session open for following Playwright nodes (default true). If false, the session is closed after the click.
- browserOptions — Collection with connection Timeout (default 30000 ms), Ignore SSL Issues, and Session ID. Set Session ID manually if the previous node is not a Playwright node, using the earlier sessionKey.
Output shape
One item per input item with json: success (true), selectorType, selector, url (page URL after the click), and playwright { sessionKey, browserEndpoint } for chaining to later Playwright nodes.
Uses Playwright's default click and auto-wait timeouts, so it errors if the element isn't found or isn't actionable. With Continue On Fail, an error item with the error message and sessionKey is returned instead. The click does not wait for navigation to finish, and the url reflects the page at the time the click returns.
Examples
Example 1: Click a login button after filling a form
Selector Type: CSS, CSS Selector: button[type="submit"], Leave Session Open: true, reusing the session from the previous Fill Form node.
Example 2: Click a button located by its text using XPath
Selector Type: XPath, XPath: //button[text()="Accept"], Browser Endpoint: ws://playwright:3000.