CloudBrowser icon

CloudBrowser

Interact with websites using a cloud-based browser instance

Overview

The node provides automation for interacting with websites through a cloud-based browser instance. Specifically, the "Navigation" resource's "Close Browser" operation allows users to close an active browser session that was previously opened via a WebSocket address. This is useful in workflows where you want to programmatically manage browser lifecycle, such as opening a browser, performing navigation or interactions, and then closing it to free resources.

Common scenarios include:

  • Automating web scraping tasks where a browser is opened, navigated, and then closed.
  • Running UI tests or automated clicks on web pages and ensuring the browser closes afterward.
  • Managing multiple browser sessions in a workflow by explicitly closing them when done.

Example: After opening a browser and navigating to a page, you can use this operation to close the browser instance cleanly using the WebSocket address obtained from the open operation.

Properties

Name Meaning
WebSocket Address The WebSocket address of the browser instance to close. This address is returned from the Open Browser operation and uniquely identifies the browser session to be closed. It is required to specify which browser instance to close.

Output

The output JSON contains a single field:

  • status: A string indicating the result of the close operation. For example, "Browser closed successfully" confirms the browser was closed without issues.

No binary data is output for this operation.

Example output:

{
  "status": "Browser closed successfully"
}

Dependencies

  • Requires an active API token credential for the cloud browser service to authenticate requests.
  • Uses Puppeteer library to connect to the browser instance via the provided WebSocket address.
  • The node sends commands to a remote cloud browser service endpoint to manage browser instances.
  • Network connectivity to the cloud browser API endpoint (https://production.cloudbrowser.ai/api/v1/Browser/Open) is necessary.

Troubleshooting

  • Common issue: Providing an invalid or expired WebSocket address will cause connection failures.
    • Resolution: Ensure the WebSocket address is correctly copied from the Open Browser operation output and that the browser session is still active.
  • Error message: "No page found in the browser" (not typical for close but may appear if trying other operations).
    • Resolution: Verify the browser session is valid and has at least one open page.
  • Error message: "No WebSocket address received from the browser service" indicates failure to open a browser or missing address.
    • Resolution: Check API credentials and network access to the cloud browser service.
  • If the node throws errors related to authentication, verify that the API token credential is correctly configured and has not expired.

Links and References

  • Puppeteer Documentation – Used internally to control browser instances.
  • Cloud browser service API documentation (if available) for details on browser management endpoints.

Discussion