Skip to content

Puppeteer

Puppeteer lets JavaScript or TypeScript drive Chrome or Firefox, read the result and capture screenshots.

Visit Puppeteer

What is a useful first check for Puppeteer?

Choose one result in an app you own, such as seeing the opening time on a local class schedule. The script can open the page, wait until the expected part appears and capture it. Have the script check the actual wording too.

A screenshot records what was visible. A separate pass or fail rule tells you whether it matched what you expected.

Which browsers and project setup does it need?

Puppeteer supports Chrome for Testing and Firefox. The documentation maps each Puppeteer release to the browser releases it supports. Check the Node.js and operating system requirements on the machine that will run the check.

The project uses the Apache 2.0 license. Keep the script, expected result and browser version in your project. You provide the machine and decide whether your existing test setup should run the script or collect its evidence.

What would you keep if a screenshot differs?

Sketch a fictional local workshop schedule with no accounts, forms or outside services. Use paper for this exercise.

  1. Mark the expected text
    Write the name and time that should appear.
  2. Mark the image boundary
    Draw the schedule area at a narrow window size and mark the part that must be visible.
  3. Record the failure
    Sketch a missing time. The text check should fail, and the saved image would help explain it. No screenshot or run was performed.