🔗Puppeteer
Also known as Puppeteer JS, Google Puppeteer
A code library that drives Chrome or Firefox. Your code does the clicks.
Think of it like
Think of it like a remote for a browser. You press buttons in code, and the browser obeys.
Example
Lucy's app uses Puppeteer to turn each invoice page into a PDF. Customers get the file by email.
Why it matters
A few lines of code can now do a job a person used to click through.
Definition
Example code
javascript
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto("https://example.com");
await page.pdf({ path: "page.pdf" });
await browser.close();Common mistake
Key takeaways
- 1Code controls it. Every click is a line of code.
- 2Headless default. No window unless you ask.
- 3Close it. Always close the browser when done.