    Skip to content

      Navigation Menu

            Sign in Appearance settings
                * Platform
                        + AI CODE CREATION
                            o GitHub Copilot Write better code with AI
                            o GitHub Copilot app Direct agents from issue to merge
                            o MCP Registry Integrate external tools
                        + DEVELOPER WORKFLOWS
                            o Actions Automate any workflow
                            o Codespaces Instant dev environments
                            o Issues Plan and track work
                            o Code Review Manage code changes
                            o Code Quality Enforce quality at merge
                        + APPLICATION SECURITY
                            o GitHub Advanced Security Find and fix vulnerabilities
                            o Code security Secure your code as you build
                            o Secret protection Stop leaks before they start
                        + EXPLORE
                            o Why GitHub
                            o Documentation
                            o Blog
                            o Changelog
                            o Marketplace
                      View all features
                * Solutions
                        + BY COMPANY SIZE
                            o Enterprises
                            o Small and medium teams
                            o Startups
                            o Nonprofits
                        + BY USE CASE
                            o App Modernization
                            o DevSecOps
                            o DevOps
                            o CI/CD
                            o View all use cases
                        + BY INDUSTRY
                            o Healthcare
                            o Financial services
                            o Manufacturing
                            o Government
                            o View all industries
                      View all solutions
                * Resources
                        + EXPLORE BY TOPIC
                            o AI
                            o Software Development
                            o DevOps
                            o Security
                            o View all topics
                        + EXPLORE BY TYPE
                            o Customer stories
                            o Events & webinars
                            o Ebooks & reports
                            o Business insights
                            o GitHub Skills
                        + SUPPORT & SERVICES
                            o Documentation
                            o Customer support
                            o Community forum
                            o Trust center
                            o Partners
                      View all resources
                * Open Source
                        + COMMUNITY
                            o GitHub Sponsors Fund open source developers
                        + PROGRAMS
                            o Security Lab
                            o Maintainer Community
                            o Accelerator
                            o GitHub Stars
                            o Archive Program
                        + REPOSITORIES
                            o Topics
                            o Trending
                            o Collections
                * Enterprise
                        + ENTERPRISE SOLUTIONS
                            o Enterprise platform AI-powered developer platform
                        + AVAILABLE ADD-ONS
                            o GitHub Advanced Security Enterprise-grade security features
                            o Copilot for Business Enterprise-grade AI features
                            o Premium Support Enterprise-grade 24/7 support
              * Pricing
                Type / to search
                Sign in
              Sign up Appearance settings
      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

              Uh oh!

              There was an error while loading. Please reload this page.

              puppeteer / puppeteer Public
              * Notifications You must be signed in to change notification settings
              * Fork 9.6k
                * Star 95.4k
          * Code
          * Issues 249
          * Pull requests 10
          * Actions
          * Security and quality 0
          * Insights
          Additional navigation options
                  * Code
                  * Issues
                  * Pull requests
                  * Actions
                  * Security and quality
                  * Insights
                                              main
                                          Branches Tags
                                            Go to file
                                        Code
                                          Open more actions menu

                                        Folders and files

                                          Name                                             Name                                               Last commit message    Last commit date
                                            Latest commit                                
                                                                                         
                                                History                                  
                                                                                         
                                                6,470 Commits                            
                                                  6,470 Commits                          
                                                  .agents/ skills/ puppeteer-verification          .agents/ skills/ puppeteer-verification                                           
                                                  .devcontainer                                    .devcontainer                                                                     
                                                  .github                                          .github                                                                           
                                                  .vscode                                          .vscode                                                                           
                                                  docker                                           docker                                                                            
                                                  docs                                             docs                                                                              
                                                  examples                                         examples                                                                          
                                                  packages                                         packages                                                                          
                                                  test-d                                           test-d                                                                            
                                                  test                                             test                                                                              
                                                  tools                                            tools                                                                             
                                                  website                                          website                                                                           
                                                  .editorconfig                                    .editorconfig                                                                     
                                                  .gitattributes                                   .gitattributes                                                                    
                                                  .gitignore                                       .gitignore                                                                        
                                                  .mocharc.cjs                                     .mocharc.cjs                                                                      
                                                  .npmrc                                           .npmrc                                                                            
                                                  .nvmrc                                           .nvmrc                                                                            
                                                  .prettierignore                                  .prettierignore                                                                   
                                                  .release-please-manifest.json                    .release-please-manifest.json                                                     
                                                  CHANGELOG.md                                     CHANGELOG.md                                                                      
                                                  Herebyfile.mjs                                   Herebyfile.mjs                                                                    
                                                  LICENSE                                          LICENSE                                                                           
                                                  README.md                                        README.md                                                                         
                                                  SECURITY.md                                      SECURITY.md                                                                       
                                                  eslint.config.mjs                                eslint.config.mjs                                                                 
                                                  package-lock.json                                package-lock.json                                                                 
                                                  package.json                                     package.json                                                                      
                                                  prettier.config.js                               prettier.config.js                                                                
                                                  puppeteer.config.js                              puppeteer.config.js                                                               
                                                  release-please-config.json                       release-please-config.json                                                        
                                                  tsconfig.base.json                               tsconfig.base.json                                                                
                                                  tsdoc.json                                       tsdoc.json                                                                        
                                                  versions.json                                    versions.json                                                                     
                                            View all files                               
                                          

                                              Repository files navigation

                                                * 
                                                * README
                                                * Contributing
                                                * Apache-2.0 license
                                                * Security
                                                More items

                                                Puppeteer

                                              Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi. Puppeteer runs in the headless (no visible UI) by default

                                                Get started | API | FAQ | Contributing | Troubleshooting

                                                Installation

                                                npm i puppeteer  # Downloads compatible Chrome during installation.
                                                npm i puppeteer-core  # Alternatively, install as a library, without downloading Chrome.

                                              :::note

                                              Modern package managers (including npm (see the RFC), pnpm, Yarn, Bun, and Deno) block dependency install scripts by default. If the install script is blocked, Puppeteer will not download the browser during installation, leading to runtime errors.

                                              You can manually download the required browsers after installation by running:

                                                npx puppeteer browsers install

                                              Alternatively, you can configure your package manager to allow the install script to run (for example, with npm, by adding "puppeteer" to "allowScripts" in your package.json).

                                              :::

                                                MCP

                                              Install chrome-devtools-mcp, a Puppeteer-based MCP server for browser automation and debugging.

                                              Puppeteer also supports the experimental WebMCP API.

                                                Example

                                                import puppeteer from 'puppeteer';
                                                // Or import puppeteer from 'puppeteer-core';
                                                
                                                // Launch the browser and open a new blank page.
                                                const browser = await puppeteer.launch();
                                                const page = await browser.newPage();
                                                
                                                // Navigate the page to a URL.
                                                await page.goto('https://developer.chrome.com/');
                                                
                                                // Set the screen size.
                                                await page.setViewport({width: 1080, height: 1024});
                                                
                                                // Open the search menu using the keyboard.
                                                await page.keyboard.press('/');
                                                
                                                // Type into search box using accessible input name.
                                                await page.locator('::-p-aria(Search)').fill('automate beyond recorder');
                                                
                                                // Wait and click on first result.
                                                await page.locator('.devsite-result-item-link').click();
                                                
                                                // Locate the full title with a unique string.
                                                const textSelector = await page
                                                  .locator('::-p-text(Customize and automate)')
                                                  .waitHandle();
                                                const fullTitle = await textSelector?.evaluate(el => el.textContent);
                                                
                                                // Print the full title.
                                                console.log('The title of this blog post is "%s".', fullTitle);
                                                
                                                await browser.close();

                                        About

                                        JavaScript API for Chrome and Firefox

                                          pptr.dev

                                        Topics

                                          automationchromechromiumdeveloper-toolsfirefoxheadless-chromenode-moduletestingweb

                                        Resources

                                          Readme
                                          Apache-2.0 license

                                        Contributing

                                          Contributing

                                        Security policy

                                          Security policy
                                          Activity
                                          Custom properties

                                        Stars

                                          95.4k stars

                                        Watchers

                                          1.2k watching

                                        Forks

                                          9.6k forks
                                          Report repository

                                        Releases

                                        Packages

                                        Used by

                                        Contributors

                                        Languages

    Footer

        © 2026 GitHub, Inc.

      Footer navigation

        * Terms
        * Privacy
        * Security
        * Status
        * Community
        * Docs
        * Contact
        * Manage cookies
        * Do not share my personal information
      You can’t perform that action at this time.