{"id":"6a665932-88a8-4931-873b-9f56ea24bfb6","task":"Send raw Chrome DevTools Protocol commands via a CDPSession in Puppeteer","domain":"pptr.dev","steps":["Launch a browser and create a page: const browser = await puppeteer.launch(); const page = await browser.newPage()","Create a CDP session for the page: const client = await page.createCDPSession()","Enable a CDP domain: await client.send('Network.enable')","Send a domain command: await client.send('Network.emulateNetworkConditions', { offline: false, downloadThroughput: 1.5 * 1024 * 1024 / 8, uploadThroughput: 750 * 1024 / 8, latency: 40 })","Subscribe to CDP events: client.on('Network.requestWillBeSent', (event) => console.log(event.request.url))","Detach the session when done: await client.detach()"],"gotchas":["CDP domains must be explicitly enabled (e.g. Network.enable, Runtime.enable) before sending commands or subscribing to events in that domain; omitting the enable call results in silent failures","CDPSession targets are tied to a specific page target; if the page navigates to a cross-origin frame, you need a separate CDPSession for the frame target to inspect it","CDP is a Chromium-only protocol; Puppeteer's WebDriver BiDi backend does not support createCDPSession, so ensure you are using a Chromium-backed browser instance"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/6a665932-88a8-4931-873b-9f56ea24bfb6"}