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
Make your Browsers work for You
Search
Jev Zelenkov
May 14, 2014
Programming
0
78
Make your Browsers work for You
Learn about Selenium WebDriver and get excited by beautiful & concise E2E tests
Jev Zelenkov
May 14, 2014
Tweet
Share
More Decks by Jev Zelenkov
See All by Jev Zelenkov
Prototypical inheritance in ECMAScript 6
jevzee
0
92
Other Decks in Programming
See All in Programming
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
CSC307 Lecture 02
javiergs
PRO
1
780
Oxlintはいいぞ
yug1224
5
1.3k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
ぼくの開発環境2026
yuzneri
0
220
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
AI & Enginnering
codelynx
0
110
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Designing for Timeless Needs
cassininazir
0
130
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
How STYLIGHT went responsive
nonsquared
100
6k
The agentic SEO stack - context over prompts
schlessera
0
640
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
Transcript
E2E testing with WebDriver API @jzelenkov FrankfurtJS #2 14 May
2014 Make your Browsers work for You
Do you write any front end tests?
complexity
changes
unit testing
(another) end from (one) end 2 http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html
Browsers
real
SlimerJS* PhantomJS headless * SlimerJS is not a fully headless
browser yet
ZombieJS unreal
or WebDriver ? Selenium
Selenium WebDriver* * Selenium RC
Selenium WebDriver* * Selenium RC epic naming #1
e2e test browser(s) selenium server API 1 1 WebDriver JSON
Wire Protocol Selenium WebDriver 2 Standalone Driver 3 Extension Driver 2 3 2
Selenium WebDriver JS Wrapper npm: selenium-webdriver
driver.get(‘http://...’); driver.findElement(webdriver.By.name('whoami')) .sendKeys('FrankfurtJS!'); driver.findElement(webdriver.By.id('greet')) .click(); driver.findElement(webdriver.By.id('message')) .getText() .then(function(val) { assert.equal(val,
'FrankfurtJS!'); }); SWD WebDriverJS
Alternatives
WebDriverJS http://webdriver.io @webdriverjs npm: webdriverjs
WebDriverJS http://webdriver.io @webdriverjs npm: webdriverjs epic naming #2
client .init() .url(‘http://...’) .addValue('[name="whoami"]', 'FrankfurtJS!') .buttonClick('#greet') .getText('#message', function(err, text) {
assert.equal(text, 'FrankfurtJS!'); }) WebDriverJS
DalekJS http://dalekjs.com @dalekjs npm: dalekjs
test .open('http://...') .type('[name="whoami"]', 'FrankfurtJS!') .click('#greet') .assert.text('#message').is('FrankfurtJS!') .done(); DalekJS
Protractor https://github.com/angular/protractor @ ProtractorTest npm: protractor
browser.ignoreSynchronization = true; ! browser.get(‘http://...'); element(by.name('whoami')).sendKeys('FrankfurtJS!'); element(by.id('greet')).click(); element(by.id(‘message')) .getText() .then(function(val){
assert.equal(val, 'FrankfurtJS!'); }); Protractor
others npm: selenium-test-runner npm: wd . . . npm: wd-sync
npm: yiewd . . . . . .
Selenium WebDriver Issues browser support frontend code
end 2 end for the win recap
thank you!
this presentation: https://speakerdeck.com/jzelenkov source code: http://bit.ly/1sNtUVL