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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
120
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
250
Unity6.3 AudioUpdate
cova8bitdots
0
120
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
530
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
190
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
410
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
690
Claude Codeログ基盤の構築
giginet
PRO
7
2.1k
Windows on Ryzen and I
seosoft
0
240
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
3
1.2k
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
Design in an AI World
tapps
0
170
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
130
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
440
Unsuck your backbone
ammeep
672
58k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
460
Color Theory Basics | Prateek | Gurzu
gurzu
0
240
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
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