Skip to main content
POST
Activate Tab

Overview

The /browser/sessions/{id}/pages/{pageId}/activate endpoint switches the session’s active tab to the one identified by pageId. The tab is brought to the foreground and becomes the target for all subsequent session-scoped operations (mouse, keyboard, navigate, content, screenshot, PDF). This avoids having to pass pageId on every request — set the active tab once, then use the compact session-scoped endpoints.

Path Parameters

string
required
Browser session ID (UUID). Create via POST /browser/sessions.
string
required
CDP target identifier of the tab to activate. 32-character uppercase hex. Obtain via POST /pages or GET /pages.

Body

No request body. Send an empty request.

Example Request

Response

Success Response (200)

boolean
true when the tab was activated.
string
CDP target identifier of the now-active tab (echoed back for correlation).
Example Response:

Error Responses

Notes

  • Subsequent session-scoped operations (mouse, keyboard, navigate, content, screenshot) target whichever tab is currently active. Use this to swap context between tabs without needing per-request pageId plumbing.
  • The active tab also reflects in noVNC live-view — activating a tab brings it to the foreground for anyone watching.