Presenter: Jason Carr
Track: IV
Description:
Selenium has grown to be a mature platform on the desktop, but with ‘mobile now’ being the mantra for so many companies, can we use Selenium to effectively test mobile apps? What about Native apps? This talk will cover using Python to test mobile web applications with Selenium, as well as an in depth overview of the future of Selenium to test Native iOS and Android applications.
It’s a tool, like anything else, and it has its place in your toolbelt.
Selenium RC is the old bustedness. It doesn’t support some mobile browsers, things like that.
Selenium WebDriver is the new hotness, aka Selenium 2. It supports mobile browsers.
It is pruposed that the low level web driver functionality will become a standard and will be built directly into browsers in the future.
Every mobile browser is a webdriver, because it’s not running on your computer that is running the actual Selenium script:
from selenium import webdriver
desired_capabilities = {}
desired_capabilities['browser'] = 'android'
desired_capabilities['platform'] = 'linux'
desired_capabilities['version'] = '4.0'
iOS Webdriver is gimped, won’t even let you quit, clear cache, etc, and it requires Xcode.
WebViews - A window to the internet provided by the OS that you can put in your app, they aren’t maintained the same way as full fledged browsers. Second class citizens.
They are hard to accurately test, and it’s hard to test on hardware devices.
iOS*
Currently the only option is UI Automation
Android
Not much better, UI Automator
Alternativess
This is all BAD
deploy to the app store * Use Selenium API * All methods are first class citizens, they wrap the test frameworks that the companies provide to you * Any language and OS, supported by Selenium * Open source
Wraps UI Automation and UI Instruments
Because it uses the native testing framework (and wraps it), it supports all of the browser and device functionality that the native testing framework exposes.
iOS
Your Script -> Appium Server -> iOS UI Instruments -> Test App
Android
Your Script -> Appium Server -> Android UI Automator -> Test App
They not only wrapped the native UI Automation functionality, but they also wrapped the Mobile Webkit implementation, because they want it to work on real devices. We want ito test W3C compliant browsers whenever possible.