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
3
250
puppeteer
Google Chrome Puppeteer
Jecelyn Yeen
April 14, 2018
Tweet
Share
More Decks by Jecelyn Yeen
See All by Jecelyn Yeen
WorkerConf 2021 - Browser automation with Puppeteer
jecfish
0
1.8k
My Journey as Technical Presenter
jecfish
0
940
Becoming a GDE
jecfish
0
3.8k
How to get started in IT Freelancing
jecfish
1
270
New Web API & Stylings
jecfish
3
700
如何打造高性能且SEO友好的单页应用(SPA)
jecfish
2
840
JS SEO
jecfish
4
1.5k
Web Performance Optimization
jecfish
5
1.8k
Have Fun with Angular
jecfish
0
96
Other Decks in Programming
See All in Programming
AI時代のUIはどこへ行く?
yusukebe
16
8.2k
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
430
Ruby Parser progress report 2025
yui_knk
1
300
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
18
9.9k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
890
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
410
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
430
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.5k
個人軟體時代
ethanhuang13
0
310
print("Hello, World")
eddie
1
500
MLH State of the League: 2026 Season
theycallmeswift
0
220
AWS発のAIエディタKiroを使ってみた
iriikeita
1
170
Featured
See All Featured
Practical Orchestrator
shlominoach
190
11k
Scaling GitHub
holman
463
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Embracing the Ebb and Flow
colly
87
4.8k
A Tale of Four Properties
chriscoyier
160
23k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Balancing Empowerment & Direction
lara
3
610
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Why Our Code Smells
bkeepers
PRO
339
57k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
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