Overview
This node automates browser actions using the Playwright library. It allows users to programmatically control a web browser to perform tasks such as navigating to URLs, clicking elements, filling forms, extracting text, taking screenshots, or running custom Playwright scripts. This is useful for web scraping, automated testing, monitoring websites, or any scenario where browser automation is needed without manual interaction.
For example, you can use this node to:
- Navigate to a webpage and extract specific text content.
- Automatically fill out and submit a form on a website.
- Take a screenshot of a page for visual verification.
- Run a custom script to interact with complex web applications.
Properties
| Name | Meaning |
|---|---|
| URL | The web address to navigate to. |
| Browser | The browser engine to use: Chromium, Firefox, or Webkit. |
| Browser Launch Options | Options for launching the browser: - Headless: run browser without UI. - Slow Motion: delay operations by specified milliseconds. |
Output
The node outputs an array with one item per input item processed. Each output item contains a json field with the result of the operation performed:
- For Navigate operation, the output typically confirms successful navigation or may include data returned by subsequent operations.
- For other operations (clicking, filling forms, getting text, taking screenshots), the output includes relevant data such as extracted text or binary screenshot data.
- If an error occurs and "Continue On Fail" is enabled, the output will contain an
errormessage along with metadata about the browser type and operating system.
If the node handles binary data (e.g., screenshots), it stores it in a binary property named according to user configuration (not shown here for Navigate operation).
Dependencies
- Requires the Playwright library installed in the environment.
- Downloads and installs browser binaries if not already present.
- No explicit API keys or external services are required for the Navigate operation.
- Node configuration must allow installing and running Playwright browsers.
Troubleshooting
- Browser path errors: If the node cannot find the browser executable, it attempts to install the browser automatically. Ensure the environment has internet access and permissions to install software.
- Browser launch errors: Could be caused by incompatible OS, missing dependencies, or insufficient permissions. Check logs for detailed error messages.
- Timeouts or navigation failures: Verify the URL is correct and accessible from the environment where n8n runs.
- Continue On Fail: When enabled, errors do not stop execution but return error details in output JSON.
Links and References
This summary focuses on the "Navigate" operation of the Playwright node, describing its inputs, outputs, and behavior based on static code analysis.