Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Appium : Can it be used for cross platform application testing

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?

like image 469
Abhishek Swain Avatar asked Apr 02 '14 07:04

Abhishek Swain


People also ask

Does Appium support 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.

What is main advantage of cross-platform support of Appium?

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.

Which type of mobile applications can be tested by Appium?

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.


1 Answers

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/

like image 102
Swapnil Kotwal Avatar answered Sep 27 '22 23:09

Swapnil Kotwal