112 / 168 · 01 Agent Skills for Browser Automation · WebDriver BiDi Protocol Overview← prev⊞ allnext →☰ Read as one page
15.4Sessions
Standard Session (via HTTP upgrade)
Client Browser
│ │
│── HTTP POST /session ───────────────────────►│
│ {"capabilities": {"webSocketUrl": true}} │
│◄── HTTP 200 ─────────────────────────────────│
│ {"sessionId": "...", "webSocketUrl": "ws://..."}
│ │
│── WebSocket connect ────────────────────────►│
│◄── WebSocket connected ──────────────────────│
│ │
│ Now use BiDi commands... │
BiDi-Only Session (direct WebSocket)
Client Browser
│ │
│── WebSocket connect to ws://.../ ───────────►│
│◄── WebSocket connected ──────────────────────│
│ │
│── session.new ──────────────────────────────►│
│◄── session.new result ───────────────────────│
│ │
│ Now use BiDi commands... │