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 Browser Experiments
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Christian Bäuerlein
January 28, 2016
Programming
0
410
Headless Browser Experiments
A short journey about taking screenshots with headless browsers.
Christian Bäuerlein
January 28, 2016
Tweet
Share
More Decks by Christian Bäuerlein
See All by Christian Bäuerlein
Single File Ruby Programs @ RubyUnconf 2023
fabrik42
0
170
Single File Ruby Programs 2.0
fabrik42
1
210
Single File Ruby Programs
fabrik42
0
300
Agile Software Development for Software Developers
fabrik42
0
54
Phoenix Live View
fabrik42
0
630
Rails API-only considerations
fabrik42
0
380
Org-Mode
fabrik42
0
550
Flocking Simulation with Phoenix Channels
fabrik42
1
400
Cleaner, scalable views with object oriented components
fabrik42
0
370
Other Decks in Programming
See All in Programming
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
Codex の「自走力」を高める
yorifuji
0
1.3k
Feature Toggle は捨てやすく使おう
gennei
0
240
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
730
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
170
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
610
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
170
『Kubernetes ☸️ で実践する Platform Engineering 』を最高速度で読み抜いたる!!👊🏻
hiroki_hasegawa
0
100
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
390
PHPで TLSのプロトコルを実装してみる
higaki_program
0
370
AI活用のコスパを最大化する方法
ochtum
0
270
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
130
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.1k
Building an army of robots
kneath
306
46k
Leo the Paperboy
mayatellez
4
1.5k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
190
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
240
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
480
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]