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
The Future of Selenium for mobile web and nativ...
Search
Jason Carr
November 16, 2012
Technology
1
400
The Future of Selenium for mobile web and native apps
Jason Carr
November 16, 2012
Tweet
Share
More Decks by Jason Carr
See All by Jason Carr
Using Selenium to Test Native iOS Apps
maudineormsby
2
280
Other Decks in Technology
See All in Technology
Databricks Free Edition講座 データエンジニアリング編
taka_aki
0
2.7k
Java 25に至る道
skrb
3
220
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
7
3.3k
1万人を変え日本を変える!!多層構造型ふりかえりの大規模組織変革 / 20260108 Kazuki Mori
shift_evolve
PRO
6
1.4k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
2026/01/16_実体験から学ぶ 2025年の失敗と対策_Progate Bar
teba_eleven
1
180
「リリースファースト」の実感を届けるには 〜停滞するチームに変化を起こすアプローチ〜 #RSGT2026
kintotechdev
0
980
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
SES向け、生成AI時代におけるエンジニアリングとセキュリティ
longbowxxx
0
320
I tried making a solo advent calendar!
zzzzico
0
150
AI との良い付き合い方を僕らは誰も知らない (WSS 2026 静岡版)
asei
1
320
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
1.4k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building AI with AI
inesmontani
PRO
1
630
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
0
1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
52
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
So, you think you're a good person
axbom
PRO
1
1.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
The future of Selenium testing for mobile web and native
apps
Hi. I’m JASON CARR. I work at sauce LABS.
@maudineormsby
None
I’m a developer and contributor to SELENIUM and APPIUM
Context
For mobile web, Web Driver
Script Script Selenium Grid (optional) Selenium Grid (optional) iWebDriver.app
Script Script iWebDriver.app
iWebDriver.app from selenium import webdriver hub = ‘http://localhost:3001/wd/hub’ caps =
webdriver.DesiredCapabilities.IPHONE driver = webdriver.Remote(hub, caps) from selenium import webdriver hub = ‘http://localhost:3001/wd/hub’ caps = webdriver.DesiredCapabilities.IPHONE driver = webdriver.Remote(hub, caps)
None
Limitations
iframes
driver.quit()
Alert handling
Javascript
UIAutomation
“…a bit like being dropped off in a field somewhere
with no map, tools or supplies and being told you need to build a house.” -Alex Vollmer
js js Instruments.app Instruments.app App
js js Instruments.app Instruments.app App CLIENT DEVICE
UI Automation only runs in Instruments.app
Tests have to be in Javascript
No realtime interaction with tests
Hard to reuse code
One test at a time
An aside: Android automation…
Monkey Runner
So what have we LEARNED SO FAR?
Two attempted approaches to automation
Script/ Framework Script/ Framework Screen Capture Screen Capture App CLIENT
DEVICE
Hard to abstract
Very brittle
Hard to use with real devices
Hard to use with CI or parallelize
script script Client library Client library App CLIENT DEVICE
Requires code modification
Real devices are hard
New framework and new tests
The RIGHT WAY TO AUTOMATE IOS
Remember the testing pyramid
None
Are you writing unit tests for apps? It’s not that
hard!
Test your views appropriately
For UIWebViews use iWebDriver
Yes, yes, but NOW WHAT?
Code reuse is good.
Realtime interaction
Integrate with existing automation
Parallel tests and real devices
That sounds great, BUT HOW?
APPIUM
Open Source Can be extended
Uses webdriver API Runs with off-the-shelf client libraries Language agnostic
Real time Interact with js interpreter or client
Real devices
Works in parallel (architecturally)
No code modification
test script test script Instruments.app Instruments.app App CLIENT DEVICE Appium
Server Appium Server
Easy to get started
Clone Appium
pip install bottle
python server.py /path/to/my.app
from selenium import webdriver command_url = “http://localhost:4723/wd/hub” iphone = webdriver.DesiredCapabilities.IPHONE
driver = webdriver.Remote(command_url, iphone) fields = driver.find_elements_by_tag_name('textField’) fields[0].send_keys(3) fields[1].send_keys(4) buttons = driver.find_elements_by_tag_name('button’) buttons[0].click()
DEMO
Doesn’t support execute_script() …yet. More on this later.
1 Second delay between commands UI Automation limitation
Still uses UIAutomation ‘Accessibility’ is important
WHERE DO WE GO FROM HERE?
WebKit remote debugging protocol
Drive mobile safari
Drive desktop safari
Drive chrome on android!
Android RC
Questions? Thank you!
Resources Appium Github Repo: http://goo.gl/4E5F0 Dan Cuellar’s talk on Appium:
http://goo.gl/qgLha François Reynaud on ios-driver: http://goo.gl/pzn75 Simon Stewart’s blog on mobile testing: http://goo.gl/8wl8j