Question

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?

Was it helpful?

Solution

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.

  1. uiautomatorviewer :- connect you mobile device to desktop and launch your app. In desktop terminal use 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/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top