I have one application that is developed using cross platform development tool. This app has same interface for ios(ipa) and android(apk). Can I write one automation script and run it across both the platforms i.e both for android and ios app.
Anyone tried this using Appium ? What are the locating techniques that need to be used for developing test scripts for cross platform testing. e.g by tagName, xpath ?
What are the limitations with appium for cross platform testing?
Importantly, Appium is "cross-platform": it allows you to write tests against multiple platforms (iOS, Android, Windows), using the same API. This enables code reuse between iOS, Android, and Windows testsuites.
The advantages of Appium are listed below:- For the hybrid mobile applications and Native, Appium provides cross platform. Appium supports JSON wire protocol. Appium do not require recompilation of App. Appium also supports automation test on the physical devices and also for simulator or emulator both.
Appium is an open source test automation framework for use with native, hybrid and mobile web apps. It drives iOS, Android, and Windows apps using the WebDriver protocol.
So, cross platform means Sencha right?
Que 1:- Yes, Appium support to hybrid as well as native iOS/Android app.
for automation you can reuse same code for both iOS and Android(But take it with pinch of salt). Please see 6th answer here
Check out this github link https://github.com/appium/appium.
Que 2:-
Locating elements :- you can use indexes, resource_id, text, and XPath also.
1. Indexes :- Suppose you want to get index of buttons. Appium treat specific types of elements as array. Start counting of indexes(button[0],button1 ... ) from top to bottom, left to right.
uiautomatorviewer
command (please make sure you have all ANDROID_HOME path set for tools, platform-tools, build-tools and adb devices
showing all attached devices list).It will open a window, click on right most take a screenshot button. Hover on elements present on screenshot you will see all elements by indexes, resource_id, text, and XPath
limitations :- Appium is Little bit unstable till now.
Android 4.2+ supports to uiautomatorviewer
while for lower version use Selendroid
for cross platform you need to change code capabilities
based on your platform(iOS/Android) and device version and running platforms.
See blog for help http://swapnilvkotwal.wordpress.com/2014/04/04/appium-setup-ruby-sample-test-script/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With