Playwright Delete Session Tool icon

Playwright Delete Session Tool

Deletes a browser session

Overview

This node, named "Playwright Delete Session Tool," is designed to delete a browser session identified by a session ID. It is useful in automation workflows where managing browser sessions is necessary, such as cleaning up resources after automated browsing tasks or tests have completed. For example, after running a series of automated web interactions using Playwright, this node can be used to terminate the session to free up resources and maintain system hygiene.

Properties

Name Meaning
Session ID The unique identifier of the browser session to delete. This is required to specify which session should be terminated.

Output

The node outputs a JSON string indicating the success or failure of the deletion operation. The JSON structure includes:

  • success: A boolean value (true if the session was deleted successfully).
  • message: A descriptive message confirming the deletion or explaining the failure.

Example output JSON:

{
  "success": true,
  "message": "Successfully deleted session: <sessionId>"
}

The node does not output any binary data.

Dependencies

  • Requires an API key credential for authenticating with the Playwright service.
  • Depends on an external Playwright API service that manages browser sessions.
  • Uses a validation schema to ensure the session ID parameter is correctly provided.
  • Requires proper configuration of the API authentication within n8n credentials.

Troubleshooting

  • Common issues:
    • Providing an invalid or empty session ID will cause the deletion to fail.
    • Network or authentication errors when connecting to the Playwright API may prevent session deletion.
  • Error messages:
    • "Failed to delete session: <error message>" indicates that the node encountered an error during the deletion process. This could be due to invalid session ID, expired session, or connectivity/authentication problems.
  • Resolution tips:
    • Verify that the session ID is correct and corresponds to an active session.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Check network connectivity to the Playwright API endpoint.

Links and References

Discussion