Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
puppeteer
Search
Jecelyn Yeen
April 14, 2018
Programming
260
3
Share
puppeteer
Google Chrome Puppeteer
Jecelyn Yeen
April 14, 2018
More Decks by Jecelyn Yeen
See All by Jecelyn Yeen
WorkerConf 2021 - Browser automation with Puppeteer
jecfish
0
1.9k
My Journey as Technical Presenter
jecfish
0
1k
Becoming a GDE
jecfish
0
3.9k
How to get started in IT Freelancing
jecfish
1
290
New Web API & Stylings
jecfish
3
750
如何打造高性能且SEO友好的单页应用(SPA)
jecfish
2
910
JS SEO
jecfish
4
1.6k
Web Performance Optimization
jecfish
5
1.8k
Have Fun with Angular
jecfish
0
130
Other Decks in Programming
See All in Programming
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
110
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
420
AIエージェントの隔離技術の徹底比較
kawayu
0
450
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
350
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
330
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.4k
Moments When Things Go Wrong
aurimas
3
130
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
690
AI時代のUIはどこへ行く?その2!
yusukebe
18
6k
net-httpのHTTP/2対応について
naruse
0
410
AIとRubyの静的型付け
ukin0k0
0
500
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing for Performance
lara
611
70k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
540
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
Odyssey Design
rkendrick25
PRO
2
660
Why Our Code Smells
bkeepers
PRO
340
58k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
How GitHub (no longer) Works
holman
316
150k
Balancing Empowerment & Direction
lara
6
1.1k
Transcript
Control your browser programmatically
@JecelynYeen From Kuala Lumpur, Malaysia - Google Developer Expert -
Web technologies, Angular - Software Architect @ Randstad - Organizer - Women Who Code KL
– Boss “Hey, send me a screenshot of www.competitor.com everyday.”
– Someone “If you perform a same task 10 times
repetitively, consider to automate it.”
Puppeteer - a node library which provide a high level
API to control headless Chrome or Chromium over the DevTools Protocol.
What can you do with Puppeteer? Most of the things
you do manually in the browser.
Use cases - Take screenshot - Generate PDF - Scrap
content - Automate UI testing - Timeline tracing - And more! Can - DDos Attack - Fake page loads - Credential stuffing - *Some page with audio & video Can’t
npm install puppeteer —save
Take screenshot
Generate PDF
Scrap content
Automate UI Testing
Time tracing
– Boss “Hey, send me a screenshot of www.competitor.com everyday.”
– Boss “Hey, send me screenshots of mobile, table and
desktop views of www.competitor.com everyday.”
Our use case @ Randstad PDF printing as a service
Dynamic form builder
Work Flow 1. Consultant select a form 2. Send the
form to candidate (email with url) 3. Candidate fill in the form & submit 4. Queue to process the form A. Generate PDF B. Attach PDF to email and send to candidate
PDF Printing as a service - Express + Puppeteer +
Cloud Storage - API - POST /pdf/print
Lighthouse - an automated tool for improving the quality of
web pages. *It uses Puppeteer! https://developers.google.com/web/tools/lighthouse/
How about running Puppeteer serverless-ly? https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md AWS Lambda
Gotchas - Wait for certain page element loaded - Deployment
- chromium version - Performance overhead
Additional Examples
None
None
Questions? Thank you. https://speakerdeck.com/chybie/puppeteer https://github.com/chybie/puppeteer-demo