Overview
This node automates browser actions by interacting with a remote browser automation service via HTTP requests. It supports multiple operations such as navigating to URLs, clicking elements, typing text, waiting for selectors, pressing keys, executing scripts, and closing browser tabs. This node is useful in scenarios where you want to automate web interactions without manually controlling a browser, such as automated testing, data scraping, or workflow automation involving web pages.
For example:
- Navigate to a webpage and click a button.
- Type text into a form field and submit it.
- Wait for a specific element to appear before proceeding.
- Execute custom JavaScript on the page.
- Close a specific browser tab when done.
Properties
| Name | Meaning |
|---|---|
| Profile | The browser profile to use. This identifies which browser context/session to operate on. |
| Tab ID | Optional identifier of the browser tab to target for the operation. |
These properties are required or optional depending on the operation:
- For Close Tab operation (the focus here), both
Profile(required) andTab ID(optional but typically needed) specify which browser tab to close.
Output
The output JSON object contains the following fields:
profileId: The browser profile used.tabId: The ID of the tab affected by the operation.operation: The name of the operation performed (closeTabin this case).status: The result status, usually"success"if the operation completed without errors.
No binary data is output by this node.
Example output for "Close Tab":
{
"profileId": "profileName",
"tabId": "tabIdentifier",
"operation": "closeTab",
"status": "success"
}
Dependencies
- Requires an external browser automation API server URL configured via credentials.
- Needs an API key credential to authenticate requests to the automation service.
- The node sends HTTP requests to this service to perform browser actions.
- The service must support endpoints for executing browser commands and managing profiles/tabs.
Troubleshooting
- Missing Server URL: If the server URL is not set in credentials, the node will throw an error indicating the missing configuration.
- Invalid Profile or Tab ID: Providing incorrect or non-existent profile or tab IDs may cause the API to fail or return errors.
- Network Issues: Failures in HTTP requests due to network problems or service downtime will cause errors.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output.
To resolve issues:
- Ensure the API server URL and authentication credentials are correctly configured.
- Verify that the specified profile and tab exist and are active.
- Check network connectivity and service availability.
Links and References
- n8n Documentation - Creating Custom Nodes
- Browser automation concepts: Puppeteer (similar underlying principles)
- HTTP request handling in n8n: HTTP Request Node