3 ms·
Has anyone seen a version of this trick that works with Playwright instead of Puppeteer? EDIT: https://github.com/adriancooney/puppeteer-heap-snapshot/blob/mas
by simonw 3y ago
Has anyone seen a version of this trick that works with Playwright instead of Puppeteer?
EDIT: https://github.com/adriancooney/puppeteer-heap-snapshot/blob/master/src/capture.ts https://github.com/adriancooney/puppeteer-heap-snapshot/blob... is the code that captures the snapshot, and it uses createCDPSession() - it looks like Playwright has an equivalent for that Puppeteer API, documented here: https://playwright.dev/docs/api/class-cdpsession https://playwright.dev/docs/api/class-cdpsession
- None4U 3y agoThe main/only difference here is that Puppeteer only supports Chromium, while Playwright support multiple browsers. CDP is the Chrome DevTools Protocol. Otherwise, as long as you're using Chrome in both, you get the same base protocol with a different API.