Actions10
Fill
AI-generatedOverview
This node allows direct control of a Chromium browser instance using the Playwright library connected via a Chrome DevTools Protocol (CDP) URL. It enables automation of browser actions such as clicking elements, filling inputs, navigating to URLs, taking screenshots, typing text, pressing keys, and waiting for certain page states or selectors.
Common scenarios include automated web testing, scraping data from dynamic websites, filling forms automatically, capturing screenshots of pages, and waiting for specific page events before proceeding with further automation steps.
For example, you can use this node to:
- Navigate to a login page and fill in username and password fields.
- Click a submit button.
- Wait for a confirmation message selector to appear.
- Take a screenshot of the resulting page.
Properties
| Name | Meaning |
|---|---|
| CDP URL | Chrome DevTools Protocol URL to connect to the browser (e.g., ws://localhost:9222/...) |
| Selector | Playwright CSS or other supported selector string identifying the target element |
| Text | Text to enter into an input element |
The above properties are relevant specifically for the Fill operation.
Output
The node outputs JSON objects indicating the performed operation. For the "fill" operation, the output JSON contains:
{
"operation": "fill"
}
No additional data is returned for this operation.
If other operations are used (not requested here), some may output binary data (e.g., screenshots) or other JSON results.
Dependencies
- Requires a running Chromium-based browser instance exposing a Chrome DevTools Protocol WebSocket URL.
- The node uses the Playwright library to connect and control the browser.
- No internal credentials are required beyond providing the CDP URL.
- Ensure the browser instance is accessible from the environment where n8n runs.
Troubleshooting
- Connection issues: If the node cannot connect to the provided CDP URL, verify that the browser is running with remote debugging enabled and that the URL is correct.
- Selector not found: If the selector does not match any element, the operation will fail. Double-check the selector syntax and ensure the page has loaded the element.
- Timeouts: Operations like waiting for selectors or load states have configurable timeouts. Increase these if the page is slow to respond.
- Unsupported operations: Using an operation not implemented by the node will throw an error indicating unsupported operation.