Playwright icon

Playwright

Automate browser actions using Playwright

Navigate

AI-generated

Summary

Navigates a remote Playwright browser session to a URL and returns the resulting page's full HTML and final URL, along with session info for chaining later Playwright nodes.

Inputs

  • url (required) — URL to open. Must use an allowed protocol (http/https by default; extra protocols can be added via the N8N_PLAYWRIGHT_NODE_PROTOCOLS env var as a JSON array), otherwise the node errors.
  • browser — Browser engine to connect with: Firefox (default) or Chrome (chromium). Used when a new session is created.
  • browserEndpoint — Remote Playwright endpoint (e.g. ws://playwright:3000). If empty, falls back to the endpoint stored for the session or propagated from the previous Playwright node. An error is thrown if none is found.
  • leaveSessionOpen — Keep the browser session open for following Playwright nodes (default true). If off, the session is closed after the page content is captured.
  • browserOptions — Collection with Timeout (connection timeout in ms, default 30000), Ignore SSL Issues (ignore HTTPS certificate errors, default false), and Session ID (custom session key; empty reuses the one from the previous Playwright node or generates a new UUID).

Output shape

One item per input item with json fields: content (the page's full HTML), url (the page URL after navigation), and playwright { sessionKey, browserEndpoint } for chaining into later Playwright nodes.

Navigation uses page.goto with Playwright's default wait and timeout settings. Session reuse requires the same endpoint, and a reused session with a different Ignore SSL setting throws an error. If the previous node isn't a Playwright node, set Session ID manually to the earlier sessionKey. With Continue On Fail, errors are returned as json.error alongside the sessionKey.

Examples

Example 1: Scrape the HTML of a page for later parsing

URL=https://example.com, Browser Endpoint=ws://playwright:3000, Leave Session Open=true; then parse json.content with an HTML or Code node.

Example 2: Open a page, then interact with it in later nodes

Navigate to a login page with Leave Session Open on, then chain Fill Form and Click Element nodes, which reuse the propagated sessionKey.

Example 3: One-off fetch of a page with a self-signed certificate

URL=https://internal.local, Ignore SSL Issues on, Leave Session Open=false to close the browser afterward.

Links

Discussion