
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore Puppeteer as a beginner-friendly automation framework, from project setup and basics to end-to-end testing, with builder pattern and integration architectures, plus visual regression testing, web scraping, and Cucumber integration.
Discover why puppeteer, a free Google open source library, automates browser tasks from web scraping to automated testing with zero configuration, async/await support, and headless CI/CD compatibility.
Set up a puppeteer testing project, initialize npm, and install puppeteer, mocha, and expect js. Create a tests folder with a demo.spec.js to run your first automated browser test.
Set up a puppeteer test by importing puppeteer and mocha, define a describe and it block, configure a visible browser with viewport, log the browser version, and close the browser.
Explore Puppeteer browser actions to load websites, navigate with go to, reload, and go back or forward, and log title, URL, and viewport.
Learn how test hooks streamline automated Puppeteer tests by moving browser setup and viewport configuration into before each and closing after each, reducing boilerplate across test suites.
Explore assertions in automated testing with Puppeteer, using the expect.js library to validate page title, URL, and DOM elements, including wait for selector, with clear pass/fail feedback.
Tag tests in Puppeteer suites to run only specific tests or skip outdated ones, using it.only and it.skip (and describe blocks) to control execution.
Learn to use the Puppeteer debugger to pause test execution, inspect elements, and step through code with DevTools enabled, and understand timeouts and debugging best practices.
Learn puppeteer web selectors, including css selectors, XPath, classes, IDs, and data test attributes, and test a login form by typing, clicking, waiting for selector, and validating errors.
Learn to use puppeteer to capture screenshots and generate pdf files of your application's state, saving them with specified paths and filenames.
Explore device emulations in puppeteer by selecting known devices like the iPhone 15 Pro and using page.emulate before visiting a site, then log the device details and viewport settings.
Master file upload in puppeteer by targeting input type file, uploading a text file, and submitting the form, then assert the file upload response with wait for selector.
Install mocha awesome to generate html and json test reports for your Puppeteer tests, then run with the reporter flag and share the results.
Learn to configure test scripts in package.json for puppeteer tests with mocha, including paths, js suffix filters, a 30-second timeout, and mocha awesome reporter; run tests with npm run test.
Learn to build custom functions in puppeteer and JavaScript, pass the page object as an argument, and call them from tests to log the page title and reuse puppeteer methods.
Create an end to end test for an eShop purchase using puppeteer, logging in, adding to cart, checking out, and finishing the order with assertions.
learn to implement the page objects design pattern with a login page class that encapsulates selectors and actions, boosting readability, reuse, and test maintainability in puppeteer.
Navigate the Puppeteer docs and API to locate functions and review examples. Practice drag and drops, dropdowns, dynamic content, geolocation, and scrolling to apply what you learned.
Create an empty visual regression testing project named Puppeteer Visual, initialize npm, and install puppeteer, jest, and jest-image-snapshot to prepare automated testing with puppeteer, noting chromium download.
Install prettier via npm, create a dot prettier rc, and configure semi, single quote, bracket spacing, tabs, width, and trailing comma; then set up visual regression scripts in package.json.
Set up node scripts to run visual regression tests and update snapshots with two commands, using a config file and jest.config.js to manage test execution and snapshot regeneration.
Create a jest.config.js and a test-dash-snapshots folder to set up visual regression testing, configuring rootDir to test-dash-snapshots, a 30-second testTimeout, and bail as false to run all tests.
Implement a visual regression test with puppeteer by launching a headless browser, capturing a full-page screenshot, and validating it against a base image with match image snapshot.
Target a specific area on the page and capture a single element snapshot using h1.screenshot, compare with image snapshot, and apply a percent-based threshold.
Hide dynamic elements with puppeteer before taking snapshots to prevent flakiness from timestamps, dates, or ads. Use page.evaluate and querySelectorAll to remove targeted elements, enabling reliable snapshot tests.
Learn to use Percy.io for visual regression testing and connect it to Puppeteer and other automation frameworks, with a free plan and snapshot reviews.
Create a new Percy project, sign up, log in, and connect your Puppeteer project using the generated token. Install dependencies and create a test file for the first build.
Learn how to integrate Percy visual testing with Puppeteer, install the Percy Puppeteer dependency, configure a test file and npm script, and manage snapshots and visual diffs.
Create a complete end-to-end testing project using Puppeteer and Jest. Initialize npm, configure package.json, and install core and babel dev dependencies for page objects and models.
Configure jest with puppeteer by creating jest, babel, and test script configs. Set jest-puppeteer preset, adjust test environment, bail, and set headless puppeteer options in the config.
Create a base page in a puppeteer testing framework, implementing shared utilities like fade, get title, and get URL, and establish page object inheritance.
Build a puppeteer test framework by creating a base page, a home page with visit and isNavbarDisplayed methods, a component folder, and wait-for-selector checks to verify the nav bar loads.
Continue building a puppeteer framework by adding click handlers for home, online banking, and feedback links, and implement a top bar component with sign-in interactions for login testing.
Develop and test a login page within a modular test framework by creating a login page object, asserting the login form displays, and implementing a parameterized login function.
Learn to implement a feedback form page in a Puppeteer test framework, including selectors for name, email, subject, and message, submit the feedback, and navigation to the congratulations page.
Learn to write end-to-end tests with puppeteer, navigating from the home page to the feedback form, submitting feedback, handling asynchronous waits, and optimizing runs with headless mode.
Finish an end-to-end login test from home page, verify the top nav and login form, handle failed logins, and advocate page objects for readable, maintainable tests in jest and puppeteer.
Apply framework improvement tips by removing hardcoded credentials, using environment variables, centralizing config.js, and importing username and password with ES6 destructuring.
Create a Puppeteer test project from scratch with mocha, chai, and a builder-pattern page object; one built page class manages browser sessions. Install puppeteer, mocha, chai.
Set up babel to compile javascript (including classes) to es5, install mocha-steps, and configure npm scripts with babel cli and es2015 preset to build from src and run mocha tests.
Set up and verify the puppeteer test workflow by creating a src/test structure, writing a mocha script, and building and running tests with npm.
Discover how to implement the mocha-steps library in Puppeteer tests to run sequential steps, replace the before hook with a global step function, and skip failed steps.
Develop core Puppeteer framework by creating a build page class that launches the browser, creates an extended page, and unifies viewport setup with functions like wait for text and click.
Create a builder class with a static async build function that selects mobile (iPhone X), tablet (iPad landscape), or desktop view via puppeteer device emulation and viewport settings.
Finish the builder and build page with a JavaScript proxy that merges extended page and browser commands, set viewport options, and enable mobile testing.
Extend the puppeteer page with a builder class by adding get text, get count, and wait for xpath and click to extract text and count elements.
Finish the builder class for automated testing with Puppeteer by adding is selector visible and is XPath visible functions that return true or false after a three-second wait.
Develop end-to-end tests with puppeteer by building a builder class to automate sign-in, verify element visibility, display login form, submit credentials, and validate post-login navigation.
Master end-to-end testing with puppeteer by verifying six navbar links after login, using concise visibility checks and count-based assertions to streamline test readability.
Create a login page class and use the page object model with a builder pattern. Initialize it in a before hook and call login with username and password.
Discover behavior driven development and the cucumber framework with gherkin syntax for executable specifications. Build a puppeteer testing project, implement cucumber reporter, and compose given-when-then scenarios for collaborative test automation.
Initialize a puppeteer cucumber project in Visual Studio Code with npm init, install puppeteer, cucumber, cucumber-html-reporter, and chai, and set up test and report scripts to generate HTML visualizations.
Explore cucumber feature files in behavior driven development, where plain language sentences map to executable test steps like open login page, fill login form, click submit, and verify content.
Implement cucumber js step definitions with puppeteer, using before and after hooks to manage the browser. Map steps like visiting login page, filling login form, submitting, and verifying login.
Implement puppeteer code inside cucumber world constructor in support, creating a Custom World with lounge browser, close browser, visit, fill login form, submit login, and verify login via account summary.
Execute feature scenarios by running npm test with a visible browser to see steps in action, generate json reports of pass/fail and timing, and prepare for future html cucumber reports.
Learn how to set up a puppeteer integration with code type js by creating a project from scratch, initializing npm, and installing puppeteer, prettier.
Learn to set up prettier by creating a dot prettier rc file and configuring semicolons off, single quotes, tabs, and a two-space width, noting the configuration is optional.
Configure codeceptjs with puppeteer by running npm codeceptjs init, selecting puppeteer, setting logs, localization, headless mode, and generating boilerplate tests.
Write your first puppeteer test by using the I object to open example.com, group it under a feature and scenario, and run the test headless or with the browser shown.
Master implicit and explicit waits in Puppeteer tests by using the standard wait function and specialized waits like wait for clickable, text, and request, all in seconds.
Create three scenarios inside one feature, each loading a website and waiting for 1, 2, or 3 seconds; run sequentially from top to bottom.
Learn to capture and save full-page screenshots with the save screenshots function in code set. Name files, enable full-page, and view outputs in the output directory.
Learn to assert text and elements visibility in Puppeteer tests, covering visible and not visible text, element presence, and element absence with simple, readable assertions.
Learn to implement assertions with NodeJS using the built-in assert or chai. Extract text from elements with grab text, store it, and verify with async/await.
Discover how continuous integration and continuous delivery automate building, testing, and deploying code with every commit, and compare Jenkins, Travis, and CircleCI as CI/CD providers.
Compare Jenkins, CircleCI, and Travis by examining their pros and cons, plugins, cloud vs on-prem options, and YAML configurations, with recommendations for small, open-source, and enterprise projects.
Connect a puppeteer project to a Jenkins server, set up a Jenkins build, and run tests with mocha and chai, installing puppeteer and dependencies for ci/cd.
Install prettier, create a .prettierrc config, and set semicolons off, single quotes on, use tabs, bracket spacing on, and trailing comma to es5; notice the VS Code prettier icon.
Create two node scripts for end-to-end and smoke tests using mocha, set timeouts, and place them in a test folder to simulate real-life testing and Jenkins integration.
Create a smoke test with puppeteer that verifies page load by awaiting the main form in a headless browser, then run npm run smoke test and set up Jenkins integration.
Launch a headless puppeteer browser and build a complete end-to-end test that navigates to the Test Cafe site, fills a form, checks a box, submits, and verifies results.
Install and run a Jenkins server for the puppeteer project, configure a freestyle project with a custom workspace and an execute shell step to run npm run smoke test.
Learn to make your Jenkins builds parameterized by adding a choose parameter named script, with options like e2e and smoke tests, and running npm run $script in the shell.
Explore Jenkins basics, dashboards, builds, and history to manage projects, view console output, configure settings, and run parameterized builds for end-to-end testing.
Create a node script to launch Jenkins with a java -jar Jenkins.jar command, configure http port, and enable future java, then run it via npm scripts in package.json.
This section showcases Puppeteer tips and tricks beyond testing, including web scraping and automation scripts, and guides you through a starter project setup with npm init and installing Puppeteer.
Learn to generate a full-page screenshot with Puppeteer by launching a browser, opening a page to example.com, waiting for network idle, taking a full-page PNG, and closing the browser.
convert a whole page to a pdf with puppeteer in just a couple lines of code, specifying the output path and format such as A4.
Emulate devices with Puppeteer using predefined device descriptors to simulate iPhone X and other views in headful mode for accurate responsive testing.
Discover how to fake geolocations in automated testing with Puppeteer by overriding permissions in a browser context and setting latitude and longitude to North Pole.
Perform an accessibility test with puppeteer by rendering and snapshotting the accessibility tree, then save or log the snapshot to analyze support for assistive technologies like screen readers.
Learn to measure website performance with Puppeteer by accessing navigation timing metrics within the page context, logging performance data, and analyzing load times over time.
Install puppeteer-firefox and run puppeteer to launch Firefox and navigate to a url. Wait for the sign-in button, demonstrating Firefox support and core functionality in beta.
Learn to use incognito browser contexts in Puppeteer to isolate cookies across pages, create an incognito context, open a page, and navigate for testing with isolation.
Use Babel to compile ES6 to ES5 for Puppeteer tests. Install Mocha and Chai, configure babelrc, and set up build and test scripts to run ES6 code.
Learn to use es6 classes with puppeteer by implementing a page object model, including exporting a homepage class, constructor with page, visit method, and test integration.
Discover the mocha-steps library as an alternative to mocha and learn how it marks subsequent it blocks as pending when a step fails, preventing false negatives.
Set up and configure the jest-puppeteer library to simplify connecting puppeteer and expose a global browser and page context for headless or visible tests.
Explore automated testing with puppeteer through a lightweight web scraping project on a fictive bookstore, including initializing npm, installing puppeteer, scraping data, evading protections, and storing results.
Opt into a quick, optional linting setup by installing prettier, creating a .prettierrc, and configuring it with no semicolons, two-space tabs, single quotes, and auto formatting.
Configure a config.js with the scraping URL for a fictional books site, then build a puppeteer scraper that logs book names and prices to a simple log.
Create a scraper.js for a web scraper for books, and add an npm script to run node scraper.js, then configure a loop of three runs to improve success.
Configure a puppeteer scraper by requiring puppeteer and loading the URL from config. Launch a non-headless browser, set a 10s timeout and 1200x800 viewport, and handle errors to exit.
Install the random user agent dependency, configure Puppeteer to set a new random user agent on each browser start, and bypass anti-scraping protections for undetectable scraping.
Learn to mine data from a website by building a Puppeteer scraper that extracts name and price using selectors, waits for elements, and logs results for trend analysis.
Create a date and time utility in JavaScript using the Date object to build a full date and log the current date, name, and price from a scraper.
Learn how to scrape data and save it to a local log.txt using node fs, appending each entry with date, name, and price.
Want to become a true expert in web automation and testing? Discover the full potential of Puppeteer—Google’s powerful non-Selenium browser automation framework—in this hands-on, project-based course designed to take you from beginner to advanced automation engineer.
This comprehensive and practical course is perfect for anyone looking to gain real-world experience in web automation using modern tools. From the very start, you'll jump straight into coding exercises that guide you through building and testing web applications using Puppeteer's intuitive and robust API.
You’ll start by learning installation, setup, and configuration of Puppeteer, then dive deep into advanced topics like element interaction, automation flows, and working with asynchronous browser behavior. You'll practice through real-world end-to-end testing examples, gaining experience you can immediately apply in professional projects.
A standout feature of this course is the implementation of the Builder Pattern framework, a professional and elegant approach to automation that allows you to build your own robust test framework using Puppeteer with Jest. This structured method will boost your confidence in creating scalable, readable, and maintainable test suites.
But we don’t stop there. You’ll also learn how to apply the widely-used Page Object Design Pattern—an essential for clean automation architecture. Explore Behavior-Driven Development (BDD) by integrating Puppeteer with Cucumber or CodeceptJS, and bring a visual edge to your testing with visual regression testing using either Percy or jest-image-snapshot.
To reinforce your learning and simulate real-world environments, this course includes two live projects where you’ll put your skills to the test. You’ll also receive interview preparation tips to help you confidently step into automation roles and showcase your new abilities to potential employers.
Worried about getting stuck? Don’t be. Our vibrant Q&A section is always active, filled with support from the instructor and fellow students. You’ll find expert advice, troubleshooting help, and bonus insights that keep you moving forward.
Whether you’re a QA professional, a developer expanding your toolset, or a beginner looking to enter the world of test automation, this course gives you everything you need to master Puppeteer and stand out in the industry.
Don’t wait—enroll today and start your journey to automation success with Puppeteer!