Skip to content
Use case-driven examples for using Puppeteer and headless chrome
JavaScript HTML
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
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
CONTRIBUTING.md Add contributing Mar 7, 2018
LICENSE fix license Mar 9, 2018
README.md Update README.md 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 Fix typo (#17) Dec 17, 2018
fullscreen.js Add fullscreen example May 5, 2018
google_search_features.js Change how to find the trace start event (#21) Dec 17, 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 Verify download file example Dec 17, 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_download.js Use CDP Page.setDownloadBehavior and headless for demo Dec 18, 2018
verify_download2.js Use CDP Page.setDownloadBehavior and headless for demo Dec 18, 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 Verify download file example Dec 17, 2018

README.md

Useful Puppeteer demos!

Examples for using Puppeteer to do big, bold things.

Output from some of the examples:

code_coverage.js

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_sw_caching.js

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

google_search_features.js

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

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

lazyimages_without_scroll_events.js

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

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

speech.js

Make your browser talk.

Speech demo in action

pacman.js

Play the Google Pac-Man Doodle.

ePlaying Puppeteer Pacman

element-to-pdf.js

Turn a DOM element into a PDF.

elemen-to-pdf output example

crawlsite.js

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

Crawl a site/SPA

side-by-side-pageload.js

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

License

Apache 2.0 © 2018 Google Inc.

You can’t perform that action at this time.