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
Jason Carr
November 15, 2012
Technology
2
280
Using Selenium to Test Native iOS Apps
Jason Carr
November 15, 2012
Tweet
Share
More Decks by Jason Carr
See All by Jason Carr
The Future of Selenium for mobile web and native apps
maudineormsby
1
400
Other Decks in Technology
See All in Technology
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
290
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
190
What happened to RubyGems and what can we learn?
mikemcquaid
0
300
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
400
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
180
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
150
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
240
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
250
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
The Language of Interfaces
destraynor
162
26k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
Designing for humans not robots
tammielis
254
26k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
53
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
220
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
The browser strikes back
jonoalderson
0
380
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
290
We Are The Robots
honzajavorek
0
160
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