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
Using Selenium to Test Native iOS Apps
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jason Carr
November 15, 2012
Technology
290
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using Selenium to Test Native iOS Apps
Jason Carr
November 15, 2012
More Decks by Jason Carr
See All by Jason Carr
The Future of Selenium for mobile web and native apps
maudineormsby
1
410
Other Decks in Technology
See All in Technology
VPCでもFloatingIPを使いたいんだ
y_kotani
1
110
8bit CPU 2026
koba789
7
2.9k
EMの役割で 変わったこと・変わらなかったこと
sansantech
PRO
0
190
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
77k
AI駆動開発はどこまで来たのか? ファインディの最新実態調査で読み解く現在地 Devin Con Tokyo
akiratom
4
1.8k
AIエージェントのためのデータ設計
daiz21
0
490
Kiro Crew で始める マルチエージェント開発
miu_crescent
PRO
0
200
パスキーでドライブする アカウント統合(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
330
分割40%キーボードにスムーズに入門するには
hoto17296
1
170
EUDIWの枠組みを出発点に民間エコシステムの在り方を考える(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
320
「ミスを許さない手順書」を作ってみた 〜 個人的にはこれ以上できることはあまりなさそう/20260827-ssmjp-operation-procedure-update
opelab
12
8.7k
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
0
860
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.2k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
790
Automating Front-end Workflow
addyosmani
1369
210k
Deep Space Network (abreviated)
tonyrice
0
270
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
We Are The Robots
honzajavorek
0
310
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
420
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
Transcript
Using Selenium to Test Native Applications …wait, you can do
that?
Hi. I’m JASON CARR. I work at sauce LABS.
@maudineormsby …it’s a long story.
I’m a developer and contributor to SELENIUM and APPIUM
This talk is about…
This talk is about… THE PROBLEM OF IOS APP AUTOMATION
This talk is about… LESSONS LEARNED AUTOMATING APPS
This talk is about… THE RIGHT APPROACH TO TESTING NATIVE
APPS
This talk is about… THE TOOLS AVAILABLE TO TEST YOUR
APPS TODAY
This talk is about… WHAT HOPE WE HAVE FOR THE
FUTURE.
THE PROBLEM OF IOS APP AUTOMATION
“…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
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?
Implement more of the API
WebKit remote debugging protocol
Selenium Grid support
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