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
Headless Chrome Tutorial
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
derek-b
April 19, 2018
Technology
130
0
Share
Headless Chrome Tutorial
Madison PHP tutorial using Puppeteer, Mocha, Chai and Headless Chrome.
derek-b
April 19, 2018
More Decks by derek-b
See All by derek-b
What Raising 3 Kids Taught Me About Working with Users
derekb
0
75
Pardon the disruption: a user-first approach to software design
derekb
0
100
Teaching Through Code Review
derekb
0
120
Add Location-Based Searching to Your Site with Elasticsearch
derekb
0
64
Add Location-based Searching to Your PHP App with Elasticsearch
derekb
1
370
Map, Filter, and Reduce in PHP
derekb
0
860
You Version Your Code, Why Not Your Database?
derekb
0
78
Taming Your Data with Elasticsearch - PHP Benelux
derekb
1
500
What Raising 3 Kids Taught Me About Working With Users
derekb
0
430
Other Decks in Technology
See All in Technology
Google Cloud Next '26 の裏でこっそりリリースされたCloud Number Registry & Cloud Hub コスト分析 を試してみた
hikaru1001
0
150
ファインディの事業拡大を支える 拡張可能なデータ基盤へのリアーキテクチャ
hiracky16
0
850
古今東西SRE
okaru
1
120
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
170
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
200
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
530
UIライブラリに依存しすぎないReact Native設計を目指して
grandbig
0
190
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
770
「SaaSの次の時代」に重要性を増すステークホルダーマネジメントの要諦 ~解像度を圧倒的に高めPdMの価値を最大化させる方法~
kakehashi
PRO
3
3.7k
AI時代の品質はテストプロセスの作り直し #scrumniigata
kyonmm
PRO
4
1.3k
新卒エンジニア研修、ハンズオンの設計における課題と実践知/ #tachikawaany
nishiuma
2
100
AgentCore Managed Harness を使ってみよう
yakumo
2
310
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Accessibility Awareness
sabderemane
1
110
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
220
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
330
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
250
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
130
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Designing for humans not robots
tammielis
254
26k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
Browser Automated Testing with Headless Chrome Derek Binkley @DerekB_WI
Derek Binkley @DerekB_WI JavaScript Experience?
What is It?
Derek Binkley @DerekB_WI Testing Tools • Text based • Page
recorder • Selenium WebDriver • Browser Emulator
Derek Binkley @DerekB_WI Headless Chrome • June 2017 • Full
browser • Chrome Dev Tools • No GUI
Is Anybody There?
Derek Binkley @DerekB_WI Why? • Reliability • Dependability • Sleep
better after an update
What do we need? Node Chrome Puppeteer Mocha Chai
Derek Binkley @DerekB_WI Install • npm init • npm i
—save mocha chai • npm i --save puppeteer • Add test script to package.json
Derek Binkley @DerekB_WI Setup Command package.json
Derek Binkley @DerekB_WI Basics • Test Defined as JavaScript •
Full Access to DOM • Assertions using Chai • Run using Mocha
Examples
Derek Binkley @DerekB_WI Thanks • @DerekB_WI • https:/ /joind.in/talk/034f5
Derek Binkley @DerekB_WI Resources • https:/ /developers.google.com/web/updates/2017/06/ headless-karma-mocha-chai • https:/
/medium.com/@ankit_m/ui-testing-with- puppeteer-and-mocha-part-1-getting-started- b141b2f9e21 • https:/ /github.com/GoogleChrome/puppeteer • https:/ /github.com/checkly/puppeteer-examples • https:/ /puppeteersandbox.com/