Playwright API icon

Playwright API

Interact with Playwright API

Overview

This node provides automation capabilities by interacting with browser sessions through the Playwright API. Specifically, the Session Delete operation allows users to close and remove an existing browser session identified by its Session ID. This is useful for cleaning up resources after automated browsing tasks or tests are completed, ensuring no leftover sessions consume memory or interfere with subsequent operations.

Practical examples include:

  • Ending a browser session after completing web scraping or testing.
  • Programmatically managing multiple browser sessions by deleting those no longer needed.
  • Automating cleanup in workflows that create temporary browser sessions.

Properties

Name Meaning
Session ID The unique identifier of the browser session to delete. This tells the node which active session to close and remove.

Output

The output JSON contains information about the result of the delete operation. Typically, it will confirm whether the session was successfully closed and removed. If an error occurs (e.g., invalid Session ID), the output may contain an error message describing the failure.

No binary data is produced by this operation.

Dependencies

  • Requires a valid API authentication token or credential to access the Playwright API.
  • The node depends on the Playwright service being accessible and properly configured.
  • No additional environment variables are explicitly required beyond standard API credentials.

Troubleshooting

  • Common issues:
    • Providing an incorrect or non-existent Session ID will cause the operation to fail.
    • Network or authentication errors when connecting to the Playwright API can prevent session deletion.
  • Error messages:
    • "The operation "delete" is not supported!" — indicates an unsupported operation was requested; ensure the operation parameter is set correctly.
    • Errors related to session not found or invalid session ID typically mean the provided Session ID does not correspond to any active session.
  • Resolution:
    • Verify the Session ID is correct and corresponds to an active session.
    • Check API credentials and network connectivity.
    • Use the "Get All" operation to list active sessions and confirm Session IDs.

Links and References

Discussion