Skip to main content
Puppeteer makes the same fingerprintable CDP calls as stock Playwright. For protected sites use Patchright. If your code base is Puppeteer and the targets aren’t hostile, this works.
Install puppeteer-core, not puppeteer. Driver provides the browser; nothing should be downloaded.
TypeScript

Notes

  • End your connection with browser.disconnect(), then stop the session through the API. browser.close() tells the remote Chrome to quit, so the session record closes from the browser’s side instead of by your stop call.
  • browser.pages() returns the tab the session opened with. Reuse it.
  • Connect with defaultViewport: null and set windowSize on create instead of page.setViewport. See Window size.
  • Hooks to avoid, in Puppeteer’s names: page.setRequestInterception, page.evaluateOnNewDocument, page.exposeFunction, page.setUserAgent, page.emulateTimezone, page.emulate. See Best practices.
  • Pin the puppeteer-core version you tested with. Each release targets a Chrome revision.