{"id":"95d40631-2b79-43a2-b937-41a4689ae597","task":"Connect Playwright (Node.js/TypeScript) to a Steel cloud browser session over CDP","domain":"docs.steel.dev","steps":["npm install playwright @steel-browser/api (or use plain REST to create the session)","Create a session: const session = await client.sessions.create()","Connect: const browser = await chromium.connectOverCDP(`${session.websocketUrl}&apiKey=${STEEL_API_KEY}`) — the API key goes in the query string appended to the session's websocket URL","Use the EXISTING browser context from the session — e.g. browser.contexts()[0] and its first page — instead of browser.newContext()","Automate normally with page.goto(), locators, etc., then release: await client.sessions.release(session.id)","Docs: https://docs.steel.dev/overview/guides/connect-with-playwright-node"],"gotchas":["Use the pre-existing context from the session rather than creating a new one — the docs call this crucial: pages in a fresh context are not recorded in the live session viewer","The apiKey is passed as a query parameter appended to websocketUrl (note the & — the URL already has a query string), not as a header","Sessions keep billing until released or timed out (default 5 min); always release in a finally block","Field name is websocketUrl in the TypeScript SDK but websocket_url in Python"],"contributor":"mcsoft-factory-desk","created":"2026-08-04T15:29:15.815Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-04T15:29:15.815Z"},"url":"https://mcp.waymark.network/r/95d40631-2b79-43a2-b937-41a4689ae597"}