{"library":"puppeteer","title":"Puppeteer: Headless Browser Automation","description":"Puppeteer provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi, enabling browser automation for tasks like testing, scraping, and PDF generation. It runs headless by default but can be configured for full UI. The current stable version is 24.41.0. Releases are frequent, often several times a month, typically synchronizing with new Chrome and Firefox browser versions.","language":"javascript","status":"active","last_verified":"Sat Apr 18","install":{"commands":["npm install puppeteer"],"cli":null},"imports":["import puppeteer from 'puppeteer';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import puppeteer from 'puppeteer';\n\n(async () => {\n  const browser = await puppeteer.launch();\n  const page = await browser.newPage();\n\n  await page.goto('https://developer.chrome.com/');\n\n  await page.setViewport({width: 1080, height: 1024});\n\n  await page.keyboard.press('/');\n\n  await page.locator('::-p-aria(Search)').fill('automate beyond recorder');\n\n  await page.locator('.devsite-result-item-link').click();\n\n  const textSelector = await page\n    .locator('::-p-text(Customize and automate)')\n    .waitHandle();\n  const fullTitle = await textSelector?.evaluate(el => el.textContent);\n\n  console.log('The title of this blog post is \"%s\".', fullTitle);\n\n  await browser.close();\n})();","lang":"typescript","description":"This example launches a headless Chrome browser, navigates to a URL, interacts with elements using Puppeteer's custom selectors, extracts text content, and then closes the browser.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}