Sessions, Tabs & Frames
Sessions
BAP browser pages persist across CLI invocations. When a client disconnects, the server parks the browser context. On reconnect with the same session ID, state is restored.Named Sessions
Use the-s flag to create and reuse named sessions:
-s, the default session ID is cli-<port> (e.g., cli-9222).
List Sessions
Named session identifier. Commands with the same
-s value share a browser context.Dormant sessions expire after 5 minutes (300 seconds) by default. After expiry, a new browser
context is created on next use.
Tabs
List Open Tabs
Open a New Tab
Switch to a Tab
Tab index (1-based) from the
bap tabs output.Close a Tab
Frames
For pages with iframes, use frame commands to switch context.List Frames
Switch to a Frame
Frame ID from the
bap frames output.