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
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
2
270
KotlinConf 2025_イベントレポート
sony
1
140
まずはマネコンでちゃちゃっと作ってから、それをCDKにしてみよか。
yamada_r
2
120
OCI Oracle Database Services新機能アップデート(2025/06-2025/08)
oracle4engineer
PRO
0
180
dbt開発 with Claude Codeのためのガードレール設計
10xinc
2
1.3k
20250905_MeetUp_Ito-san_s_presentation.pdf
magicpod
1
100
JTCにおける内製×スクラム開発への挑戦〜内製化率95%達成の舞台裏/JTC's challenge of in-house development with Scrum
aeonpeople
0
270
Oracle Cloud Infrastructure IaaS 新機能アップデート 2025/06 - 2025/08
oracle4engineer
PRO
0
110
開発者を支える Internal Developer Portal のイマとコレカラ / To-day and To-morrow of Internal Developer Portals: Supporting Developers
aoto
PRO
1
480
LLMを搭載したプロダクトの品質保証の模索と学び
qa
1
1.1k
新アイテムをどう使っていくか?みんなであーだこーだ言ってみよう / 20250911-rpi-jam-tokyo
akkiesoft
0
350
COVESA VSSによる車両データモデルの標準化とAWS IoT FleetWiseの活用
osawa
1
400
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
460k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
3k
Large-scale JavaScript Application Architecture
addyosmani
513
110k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Invisible Side of Design
smashingmag
301
51k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Scaling GitHub
holman
463
140k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
GraphQLとの向き合い方2022年版
quramy
49
14k
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