Overview
This node automates browser actions using Playwright, a browser automation library. It supports operations such as navigating to a URL, clicking elements, filling form fields, getting text from elements, and taking screenshots. This node is useful for web scraping, automated testing, and browser-based workflows where interaction with web pages is required. For example, it can extract text from a specific element on a webpage or automate form submissions.
Use Case Examples
- Extracting product details from an e-commerce site by getting text from specific elements.
- Automating login by filling form fields and clicking buttons.
- Taking screenshots of web pages for monitoring or documentation.
Properties
| Name | Meaning |
|---|---|
| URL | The URL to navigate to for the browser operation. |
| Selector | CSS selector to identify the target element for operations like getText, clickElement, and fillForm. |
| Browser | The browser engine to use for automation (Chromium, Firefox, or Webkit). |
| Browser Launch Options | Options to configure browser launch behavior such as running headless or slowing down operations. |
Output
JSON
json- The result of the browser operation, e.g., extracted text or confirmation of action performed.
Dependencies
- Playwright library for browser automation
- Browser executables for Chromium, Firefox, and Webkit
Troubleshooting
- Browser executable path errors may occur if the required browser is not installed; the node attempts to install it automatically.
- Errors launching the browser or performing operations may happen due to incorrect URLs, selectors, or network issues.
- If the node is set to continue on fail, errors are returned in the output JSON with error message, browser type, and OS platform for debugging.
Links
- Playwright Official Documentation - Comprehensive guide and API reference for Playwright browser automation.