Puppeteer is a JavaScript library for programmatically controlling Chrome and Firefox through the Chrome DevTools Protocol or the WebDriver BiDi protocol. It launches and manages browser instances—typically without a visible user interface—to automate interactions with web pages, enabling navigation, clicking, typing, and data extraction entirely through code.
The library distinguishes itself through deep integration with the Chromium embedding layer, allowing fine-grained process configuration with custom flags, permissions, and sandbox policies. It maintains multiple concurrent command streams to different browser targets over a shared connection, and can inject and execute JavaScript inside isolated page contexts to query DOM state or trigger synthetic events. It also supports modern bidirectional WebDriver BiDi alongside the classic DevTools wire protocol, providing cross-browser automation with event-driven primitives.
Beyond core automation, Puppeteer covers screenshot and PDF generation with precise viewport and styling control, automated testing of site behavior and appearance in real browsers, and streaming capture of compositor frames into portable image or document formats.
The project is maintained by the Google Chrome team and is distributed as an installable TypeScript package.