Get a TabSession by tab ID. Used by /batch for parallel tab execution.
(tabId: number)
| 947 | |
| 948 | /** Get a TabSession by tab ID. Used by /batch for parallel tab execution. */ |
| 949 | getSession(tabId: number): TabSession { |
| 950 | const session = this.tabSessions.get(tabId); |
| 951 | if (!session) throw new Error(`Tab ${tabId} not found`); |
| 952 | return session; |
| 953 | } |
| 954 | |
| 955 | /** Get the underlying Page for a tab id. Returns null if the tab doesn't exist. |
| 956 | * Used by the CDP bridge (cdp-bridge.ts) to mint per-tab CDPSessions. */ |