Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Headless Browser Experiments
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Christian Bäuerlein
January 28, 2016
Programming
440
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Headless Browser Experiments
A short journey about taking screenshots with headless browsers.
Christian Bäuerlein
January 28, 2016
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
190
Single File Ruby Programs 2.0
fabrik42
1
230
Single File Ruby Programs
fabrik42
0
330
Agile Software Development for Software Developers
fabrik42
0
65
Phoenix Live View
fabrik42
0
660
Rails API-only considerations
fabrik42
0
410
Org-Mode
fabrik42
0
580
Flocking Simulation with Phoenix Channels
fabrik42
1
430
Cleaner, scalable views with object oriented components
fabrik42
0
390
Other Decks in Programming
See All in Programming
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
setup-vp GitLab対応の裏側
naokihaba
0
140
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
0
220
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.6k
速習iPhone Duo対応
yuukiw00w
2
930
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
220
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
150
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
390
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
900
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
GitHub's CSS Performance
jonrohan
1033
470k
How to Talk to Developers About Accessibility
jct
2
560
Rails Girls Zürich Keynote
gr2m
96
14k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
Transcript
HEADLESS BROWSER EXPERIMENTS A short journey about taking screenshots with
headless browsers Christian Bäuerlein / @fabrik42
A headless browser is a web browser without a graphical
user interface.
PhantomJS SlimerJS CasperJS many more!
USE CASES Running test suites Web scraping / Automation Taking
screenshots
TAKING SCREENSHOTS
The project: A desktop website that lets users create a
custom mobile web app.
The challenges: How to render a list of created apps?
How to share your creations with others?
HTML IS NOT SHAREABLE URLs are easy to share. Textual
content is easy to share. Visual representations in HTML are not easy to share. But images are :)
SCREENSHOTS!
None
None
PHANTOMJS 1.X Good Just one binary Not So Good Project
was somehow stalled Bad No web font support :(
PHANTOMJS 2.0! Including web font support! *yay* Let's try again...
PROBLEM Present your work on a web page to somebody
who can't access it right now.
RESPONSIVE MOCKUPS github.com/fabrik42/responsive_mockups
RESPONSIVE MOCKUPS Takes screenshots of a webpage in different resolutions
and automatically applies it to mockup templates.
None
None
None
REQUIREMENTS Easy to install. No dependencies, if possible. Nice templates
to start right away.
EASY INSTALLATION brew install phantomjs git clone [responsive_mockups] && cd
responsive_mockups phantomjs example.js
EXAMPLE.JS var mockup = require('./index'); mockup.create({ url: 'https://flinc.org/home', template: 'flat_responsive_2',
output: 'my_mockup.png' });
HOW IT WORKS 1. User provides URL and template name.
2. PhantomJS generates screenshots based on different viewports. 3. PhantomJS assembles mockup image using a local HTML file and <canvas>.
None
None
None
None
None
None
None
None
RESPONSIVE MOCKUPS github.com/fabrik42/responsive_mockups
Mockup graphics are nice, but what about... MOCKUP PHOTOS?
None
None
DEMO TIME!
http://phantomjs.org/supported-web-standards.html WebGL CSS 3D Video and Audio The following features,
due to the nature of PhantomJS, are irrelevant:
None
Atom Editor Visual Studio Code Slack Mapbox Map Designer ...
nightmare.js!
Knows how to WebGL :)
None
ONE MORE THING...
Now that we mastered all kind of images, what about...
MOVIES!
None
STOP MOTION IN HTML & JS Create an animation Stop
at every frame Make a screenshot Go to the next frame
DEMO TIME!
Remember: We wanted to make things shareable.
CUSTOMIZED MOVIES!
Manipulate the movie while rendering the frames browser .evaluate(function (currentFrame)
{ stage.goto(currentFrame); }, currentFrame)
ADVANCED DEMO TIME!
Q & A Christian Bäuerlein github.com/fabrik42 twitter.com/fabrik42
[email protected]