Use case-driven examples for using Puppeteer and headless chrome
Switch branches/tags
Nothing to show
Clone or download
Latest commit ea0abad Oct 10, 2018
Failed to load latest commit information.
cdp spacing Apr 12, 2018
html chrome 41 is the worst Sep 13, 2018
lighthouse update pptr API Aug 28, 2018
output ignore everything in the output dir except the placeholder keeping th… May 21, 2018
.gitignore ignore everything in the output dir except the placeholder keeping th… May 21, 2018 Add contributing Mar 7, 2018
LICENSE fix license Mar 9, 2018 Update Oct 10, 2018
code_coverage.js Minor fix in "Run" section of file comment May 22, 2018
connect.js Add comments Mar 16, 2018
crawlsite.js fix #6 (#16) Oct 9, 2018
detect_sound.js add rest of license headers Mar 2, 2018
element-to-pdf.js update comment Apr 17, 2018
fullscreen.js Add fullscreen example May 5, 2018
google_search_features.js Use pptr next. Update search example to use trace buffer Apr 12, 2018
hash_navigation.js fix typo Apr 13, 2018
lazyimages_without_scroll_events.js lazy images: add placeholder waitForNetworkIdle Oct 9, 2018
monitor_internet_connection.js add rest of license headers Mar 2, 2018
package.json Update lazy load script Sep 12, 2018
pacman.js pacman demo Apr 10, 2018
screenshot_element_on_tab.js screenshot_element_on_tab.js: fix typo Sep 5, 2018
server.js Updates per ebidel request May 11, 2018
side-by-side-pageload.js Fix typos Apr 26, 2018
speech.js Typo Apr 11, 2018
verify_sw_caching.js verify sw: add license header. Mar 2, 2018
view-source.js add rest of license headers Mar 2, 2018
yarn.lock Update lazy load script Sep 12, 2018

Useful Puppeteer demos!

Examples for using Puppeteer to do big, bold things.

Output from some of the examples:


Test lazy loading strategy by seeing CSS/JS code coverage usage across page load.

screen shot 2018-02-26 at 10 20 41 am


Verify all the resources you expect are being cached by a service worker for offline.

screen shot 2018-03-01 at 5 09 32 pm


Gut check your page to make sure it renders correctly for Google Search.

screen shot 2018-03-07 at 12 50 32 pm


Determine if your lazy loaded images will be seen correctly by Google Search.

screen shot 2018-10-09 at 12 15 10 pm


Make your browser talk.

Speech demo in action


Play the Google Pac-Man Doodle.

ePlaying Puppeteer Pacman


Turn a DOM element into a PDF.

elemen-to-pdf output example


Discover all the URLs on a site and visualize the subpages.

Crawl a site/SPA


Load 2 or more pages side-by-side to visually see the difference in page load. Optional desktop viewport and throttling settings.

Side by side page load


Apache 2.0 © 2018 Google Inc.