Overview
The node "Auto Browser" automates browser actions by interacting with a remote browser automation service via HTTP requests. It supports various operations such as clicking elements, navigating to URLs, typing text, waiting for elements, pressing keys, executing scripts, and closing tabs within a specified browser profile and tab.
This node is beneficial in scenarios where automated web interactions are needed without manual intervention, such as:
- Automated testing of web applications.
- Web scraping or data extraction workflows.
- Automating repetitive browser tasks like form filling or button clicking.
- Running custom JavaScript on web pages remotely.
For example, you can use this node to navigate to a login page, type credentials into input fields, click the login button, wait for a selector indicating successful login, and then execute a script to extract user data.
Properties
| Name | Meaning |
|---|---|
| Profile | The browser profile to use. This identifies which browser context/session to operate on. |
| Tab ID | Optional tab identifier to specify which browser tab to target for the operation. |
| Selector | CSS selector of the element to interact with (required for click, type, and waitForSelector operations). Examples: #buttonId or .className. |
Note: The above properties apply specifically to the "Click" operation as requested. Other operations have additional properties not listed here.
Output
The node outputs JSON objects containing details about the performed operation:
profileId: The browser profile used.tabId: The tab identifier where the action was executed.operation: The name of the operation performed (e.g., "click").status: The result status, typically"success"if the operation completed without error.- For some operations (like executing scripts), an additional
datafield contains the returned script evaluation result.
No binary data output is produced by this node.
Example output JSON for a click operation:
{
"profileId": "default",
"tabId": "abc123",
"operation": "click",
"status": "success"
}
Dependencies
- Requires connection to an external browser automation server, configured via credentials that provide the server URL and API authentication.
- The node sends HTTP POST or DELETE requests to this server to perform browser actions.
- Proper configuration of the API key credential and server URL is necessary for the node to function.
Troubleshooting
- Missing Server URL: If the server URL is not found in credentials, the node will throw an error. Ensure the API credential is correctly set up with the server URL.
- Invalid Selector: Using an incorrect or non-existent CSS selector may cause the operation to fail or timeout. Verify selectors carefully.
- Tab ID Issues: Providing an invalid or closed tab ID may cause errors when targeting specific tabs.
- Timeouts: Operations like
waitForSelectormay timeout if the element does not appear within the specified time. - API Connectivity: Network issues or incorrect API credentials can prevent communication with the browser automation server.
- To handle errors gracefully, enable "Continue On Fail" in the node settings to allow workflow continuation despite individual failures.
Links and References
- CSS Selectors Reference
- General browser automation concepts (e.g., Puppeteer, Playwright) for understanding underlying actions.
- n8n documentation on creating and using credentials and HTTP request helpers.