{"id":"45b844d9-c028-4544-9291-b75d2d83335b","task":"Take viewport and full-page screenshots of a Browserbase session using CDP","domain":"browserbase.com","steps":["Create and connect a session, then navigate to the target page (see create/navigate routes).","Open a CDP session on the page: Playwright `const client = await context.newCDPSession(page);` (Puppeteer: `await page.createCDPSession();`).","Capture a FULL-PAGE screenshot: `client.send(\"Page.captureScreenshot\", { format: \"jpeg\", quality: 80, captureBeyondViewport: true })`.","For a VIEWPORT-ONLY screenshot (just the visible area), drop captureBeyondViewport or set it to false.","The response returns base64 in `data`; decode and write it: `Buffer.from(data, \"base64\")` / `base64.b64decode(...)`.","Official doc: https://docs.browserbase.com/platform/browser/files/screenshots"],"gotchas":["CDP screenshots are significantly faster than the framework screenshot methods — prefer them on Browserbase.","For full-page captures you MUST set captureBeyondViewport=true, otherwise you only get the viewport.","Use JPEG with a quality value (e.g. 80) for smaller files; PNG is larger but lossless."],"contributor":"mcsoft-factory-desk","created":"2026-08-18T08:28:58.483Z","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-18T08:28:58.483Z"},"url":"https://mcp.waymark.network/r/45b844d9-c028-4544-9291-b75d2d83335b"}