Of the 5 Target methods, browser sessions serve 5, phone sessions 0 and computer sessions 5. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.

Target.getTargets

Browser: served Phone: not served Computer: served The open tabs, in the order they were opened, oldest first (as Playwright’s context.pages()); not the tab strip’s visual order. A tab reopened as about:blank after the last one closed counts as newly opened. active is the tab in front; current is the one target-scoped calls without a targetId go to. They differ when a page brings a popup forward.
{"id": 1, "method": "Target.getTargets", "params": {}}
No params. Result
FieldTypeDescription
targetsTargetInfo[]

Target.createTarget

Browser: served Phone: not served Computer: served Open a tab at url (about:blank when omitted). The new tab comes to the front but does not become current; pass its targetId, or activate it. url follows Page.navigate’s scheme rule.
{"id": 1, "method": "Target.createTarget", "params": {}}
ParamTypeRequiredDescription
urlstringNoOmitted opens about:blank.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result
FieldTypeDescription
targetIdstringOpaque tab id, stable while the tab is open. Never parse it.

Target.closeTarget

Browser: served Phone: not served Computer: served Close a tab. Closing the current target leaves none: target-scoped calls without a targetId fail with TargetNotFound until Target.activateTarget, even when the last tab closed and about:blank was opened in its place.
{"id": 1, "method": "Target.closeTarget", "params": {"targetId": "<targetId>"}}
ParamTypeRequiredDescription
targetIdstringYesOpaque tab id, stable while the tab is open. Never parse it.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.

Target.activateTarget

Browser: served Phone: not served Computer: served Bring a tab to the front and make it the current target.
{"id": 1, "method": "Target.activateTarget", "params": {"targetId": "<targetId>"}}
ParamTypeRequiredDescription
targetIdstringYesOpaque tab id, stable while the tab is open. Never parse it.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.

Target.waitForTarget

Browser: served Phone: not served Computer: served Wait for a tab matching openerId and urlContains, such as a popup or a target=_blank link. With afterSeq, only tabs opened after that event-log position count; without it, an already open match answers at once. Fails with EventsExpired when afterSeq is older than the log keeps, and ActionTimeout when timeoutMs runs out.
{"id": 1, "method": "Target.waitForTarget", "params": {}}
ParamTypeRequiredDescription
openerIdstringNoOpaque tab id, stable while the tab is open. Never parse it.
urlContainsstringNoA substring the tab’s URL must contain.
afterSeqintegerNoOnly events after this event-log position count (a response’s seq). The log keeps each category for its own window (events: 1000 entries or 5 minutes; network records: 5000 entries or 2 minutes). One older than the window of the category the wait reads fails with EventsExpired; re-read state instead.
timeoutMsintegerNoBudget in milliseconds. 0 or omitted means 30000; at most 120000. Running out is ActionTimeout.
Result
FieldTypeDescription
targetIdstringOpaque tab id, stable while the tab is open. Never parse it.
urlstring
titlestring
activebooleanThe tab is in front.
currentbooleanTarget-scoped calls without a targetId go to this tab.
openerIdstringThe tab whose page opened this one, for popups and target=_blank links.