[Beta Version]                                                                                        Last Updated: 26/Aug/2019



1.     Note

2.     Why Automation

3.     Why Appium

4.     How Appium Works

5.     Automation Framework ( Serenity BDD ) & Demo Project  – DON’T MISS

6.     API ( Ruby )

7.     SCM , Cloud CI

8.     Efficient Ways of Bugs Tracking & TC Management – My Views

9.     Appium Project Bugs Reporting

10.     Useful Links ( TBR )

11.   Elements Locator Strategy

12 .  Grid Setup, Parallel Execution

13.   Continuous Integration


Mark Watney Quote from The Martian movie At some point, everything’s gonna go

south  on you and you’re going to say, this is it. This is how I end.   Now you can either

accept that,  or you can get to work. That’s all it is. You just begin. You do the math. You

solve one  problem and you solve the next one, and then the next. And If you solve

enough  problems,  you get to come home.” [ so true; in everyday’s work of Automation Engineer ]


1. Note:

I’m from Web Automation background , working with Selenium + Java.

                Because of circumstance / compulsions had to use Ruby for Mobile Automation 🙂 But I feel it’s always good to have knowledge of one of the scripting language as well.

                This blog post is to share my learnings about Appium + Ruby, Java for Android & iOS automation native app UI automation.

How To Pass A Coding Interview As An Automation Developer

3 Ways QA Engineers Can Keep Pace With Developers


2. Why Automation

If you and/or your boss/management is/are convinced about automation , then only do it otherwise it won’t be value add to yourself or project or company

Ok; below are the reasons why “I” ( was, am & will be convinced to ) do automation

– has got hundreds / thousand of test cases which need to be run on multiple devices , OS versions, multiple times as well

– can’t do it manually each time , as it’s boring and waste of manual time , energy etc

– Developers , Product Owner , Management wants quick ( as early as possible by a good QA engineer ) feedback on health of s/w

– just automate whatever is possible and run daily basis


3. Why Appium ?

– As it’s used by majority of companies ( Job Sites are easier way to find out which tools are used by majority of the companies 🙂 )

– It’s based on Selenium 2.0 , thus easy to get started in case you’re from web automation background


4. How Appium Works ?

( http://appium.io/introduction.html?lang=en )

http://nishantverma.gitbooks.io/appium-for-android/content/appium/why_appium.html – image

Appium – node.js server

Test Cases – any language supported by Selenium WebDriver API

AUT ( Emulator / Simulator / Device ) –  takes the Selenium commands from your test code and translates them into a readable format for UIAutomator, using the WebDriver JSON Wire Protocol.

Client/Server Architecture

Appium is at its heart a webserver that exposes a REST API.

1.1 It receives connections from a client

1.2 listens for commands

1.3 executes those commands on a mobile device

1.4 responds with an HTTP response representing the result of the command execution

we can write our test code in any language that has a http client API


info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)

info: Appium REST http interface listener started on

info: Console LogLevel: debug


Automation is always performed in the context of a session. 

Clients initiate a session with a server in ways specific to each library, but they all end up sending a POST /session request to the server, with a JSON object called the ‘desired capabilities’ object. 

At this point the server will start up the automation session and respond with a session ID which is used for sending further commands.


info: –> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:”iOS”,”platformVersion”:”9.2″,”udid”:”dc84c00dc6807d13d0997ee802e7faa4a26f65ba”,”deviceName”:null,”newCommandTimeout”:999999,”app”:”/Users/vikram-anna/Library/Developer/Xcode/DerivedData/wunderlist-ddifxljcmzpfdfgvqrmvjoepiisx/Build/Products/Development-iphoneos/Wunderlist.app”,”automationName”:”Appium”,”waitForAppScript”:”$.delay(3000); $.acceptAlert();”,”autoDismissAlerts”:true,”nativeInstrumentsLib”:true}}

info: Client User-Agent string: appium/ruby_lib/8.0.0

info: [debug] Using local app from desired caps: /Users/vikram-anna/Library/Developer/Xcode/DerivedData/wunderlist-ddifxljcmzpfdfgvqrmvjoepiisx/Build/Products/Development-iphoneos/Wunderlist.app

info: [debug] Creating new appium session 63dfcc4f-fc6a-48d0-8e0b-e8d46a4a6b39

info: [debug] Appium session started with sessionId 63dfcc4f-fc6a-48d0-8e0b-e8d46a4a6b39

info: [debug] Responding to client with success: {“status”:0,”value”:{“ELEMENT”:”60″},”sessionId”:”63dfcc4f-fc6a-48d0-8e0b-e8d46a4a6b39″}

info: data-blogger-escaped-comment—data-blogger-escaped-comment—data-blogger-escaped-comment—data-blogger-escaped-comment—data-blogger-escaped-comment—data-blogger-escaped-comment—data-blogger-escaped-comment—

info: –> POST /wd/hub/session/63dfcc4f-fc6a-48d0-8e0b-e8d46a4a6b39/element/60/click {}

Desired Capabilities

set of keys and values (i.e., a map or hash) sent to the Appium server; to tell the server what kind of automation session we’re interested in starting up


Android Capabilities

iOS Capabilities

Appium Server

Appium is a server written in Node.js

It can be built and installed from source or installed directly from NPM.

Appium Clients

There are client libraries (in Java, Ruby, Python, PHP, JavaScript, and C#) which support Appium’s extensions to the WebDriver protocol

When using Appium, you want to use these client libraries instead of your regular WebDriver client.

                     Appium webserver works quite similar to selenium server which recives http requests from selenium client libraries through JSON and then it handles those requests in different ways depending upon the platforms your are looking at. Appium has its own mechanism for iOS and Android.



5. Automation Framework ( Serenity BDD ) & Demo Project  

1> Serenity BDD – Automated Acceptance Testing With Style

2> Don’t waste your time and money on building or maintaining automation framework, just use “Serenity BDD”

Read my articles

Managing Automation Projects Efficiently with best open source framework – Serenity BDD

Waiter to Assistant Cook with BDD & Cucumber – Stop Burning & Scrapping The Toast



( It’s shameful of Selenium Conference Team to reject above talk in Berlin 2017 conference and replace with one of the pathetic talks https://www.youtube.com/watch?v=nqLT7iPR4rg&list=PLRdSclUtJDYV8I_B5rLkMI7jL_JMv7GRO&index=4, just because she is wife of one of the contributors  Jim Evans )

3> Demo Project



6. API ( Ruby )

Refer below places to find out methods

1>  https://github.com/appium/ruby_lib/blob/master/docs/docs.md

2>  http://selenium.googlecode.com/git/docs/api/rb/index.html

3>  https://github.com/appium/ruby_lib/tree/master/docs

4>  http://www.rubydoc.info/github/appium/ruby_lib/Appium


7. SCM , Cloud CI

1> http://www.projecthut.com/version-control-systems-compared/

2> http://www.rightscale.com/blog/cloud-management-best-practices/continuous-integration-and-delivery-cloud-how-rightscale-does-it

8.   Efficient Ways Of Bugs Tracking & TC Management – My Views

1.  Human being is lazy by nature but QA engineer can’t & shouldn’t be 🙂 So just go ahead and write down user stories in SCM tool itself and get it reviewed with Development and Product Owner.

2. Keep revisiting / updating / adding / editing user stories based on bugs found during testing and by real users.

3. Map these user stories to automation scripts ( 1: 1 mapping to make sure no regression bugs are missed to production )

A BDD Lesson From My Past ( https://twitter.com/tonybruce77?lang=en

9.   Appium Project Bugs Reporting

In case you find any bug , just don’t complain in https://discuss.appium.io but file it under https://github.com/appium/appium/issues


10. Useful Links: ( TBR )

1.   appium official documentation

https://github.com/appium/appium/tree/master/docs/en )

2.   Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend

https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md )

3.  Appium Prime Cuts ( Webinar from Dan Cuellar – Saucelabs )

4.  Adding Accessibility Identifiers to an iOS App

  5. https://www.youtube.com/watch?v=ySglJIrDVMQ ( Appium v.1.6.0 – How to setup iOS Automation with XCUnitTest WebDriverAgentRunner )

  6. Setup Appium on Mac OS to run automated tests from Java Classes on Android & iOS

  7. https://github.com/SrinivasanTarget/awesome-appium ( A curated list of delightful Appium resources. )

  8. http://shashikantjagtap.net/dockerising-appium-talk-at-appium-london-meetup/  ( Dockerising Appium

  9. https://testobject.com/blog/2016/01/how-to-test-ios-apps-with-appium-on-os-x.html         ( How to Test iOS Apps with Appium on OS X – TestObject )

  10. Appium iOS Provisioning Profile   ( http://stackoverflow.com/questions/25733751/appium-provisioning-profile )

  11. http://dentedghost.blogspot.de/2015/06/appium-testers-perspective-for-ios.html

12. https://discuss.appium.io/t/appium-developer-certificate-issues/2765/16

13. http://appium.readthedocs.io/en/stable/en/appium-setup/real-devices/

14. https://discuss.appium.io/t/appium-ios-app-testing/105/6  ( Appium iOS App Testing – Refer to JessicaSachs answer )

  15. http://mobiletest.engineer/ – Lots of useful info about Mobile Testing 

  16. Get Involved – http://appium.io/get-involved.html

  17. http://sauceio.com/index.php/tag/appium-bootcamp/ – BOOT CAMP

  18. This section describes setup for Appium Ruby version.

         Follow below blog from Dave Haeffner. 


and chapter 2 ( link in above blog )


1. http://www.selenese.in/souce-lab-appium-blog/

2.  http://sauceio.com/index.php/2013/07/guest-post-mobile-testing-the-google-way-with-appium-sauce-labs/

3. http://sauceio.wordpress.com/tag/matthew-edwards/

19.  http://www.atlantbh.com/appium-setting-up-mobile-automation-infrastructure-and-ci/ ( Appium , Real Devices , Jenkins , Appium + iOS + Jenkins , Appium + Android + Jenkins )

20. https://nishantverma.gitbooks.io/appium-for-android/content/index.html ( Appium for Android – online book )

21.  https://www.utest.com/courses/how-to-set-up-your-first-android-automation-project-with-appium ( How to setup Your First Android Automation Project with Appium – utest course )

22. Start & Stop Appium Server Programmatically

1. http://megettingerror.blogspot.com/2015/01/java-code-to-start-appium-server-on-mac.html – start and stop appium server

2. http://blog.rightqa.com/2015/08/start-stop-appium-server.html

3. http://stackoverflow.com/questions/6356340/killing-a-process-using-java – kill a service / process

4. https://www.linkedin.com/pulse/startstop-appium-server-programmatically-using-java-hassan-radi

5. https://discuss.appium.io/t/launching-and-stopping-appium-server-programmtically/700/4

23. https://discuss.appium.io/t/support-for-automating-multiple-devices-simultaneously/230 – multiple devices

24. https://github.com/saikrishna321/AppiumTestDistribution – parallel 

25. https://github.com/saikrishna321/PageObjectPatternAppium

26. http://qaautomationworld.blogspot.in/2014/11/appium-remote-execution-grid-execution.html

27. https://github.com/saikrishna321/AppiumTestDistribution/issues/7

28. http://blog.rightqa.com/2015/07/an-introduction-to-appium-architecture.html ( An Introduction to Appium Architecture )

29. https://www.built.io/blog/2015/03/start-automating-native-ios-testing-with-appium-using-node-js/ ( Start Automating Native iOS testing with Appium using Node.js )

30. https://help.testobject.com/docs/guides/appium-osx-ios/  ( Appium Teting on Physical iOS devices )

31. https://help.testobject.com/docs/guides/appium-osx-android/ ( Appium Testing on Physical Android Devices )

32. http://blog.wedoqa.com/2015/10/setting-up-appium-on-mac-os-x-for-ios-virtual-devices-to-test-your-application/  ( Setting Appium on Mac OS )

33. https://aaronpresley.com/building-ios-app-use-appium-gui/ (  
Building iOS App simulator only for Use in Appium GUI )

34. https://wiki.saucelabs.com/display/DOCS/Instant+Appium+Python+iOS+Real+Device+Tests#InstantAppiumPythoniOSRealDeviceTests-BuildingYouriOSAppforRealDeviceTesting ( Building iOS App for Real Device Testing )

35. http://james-willett.com/category/appium/  ( James Willett – Technical Testing )

Appium + iOS Real device issues ??

36. iOS UIAutomation to XCUITest Migrationhttps://github.com/appium/appium/blob/master/docs/en/advanced-concepts/migrating-to-xcuitest.md )

37. Android UIAutomator to UIAutomator 2https://github.com/appium/appium-uiautomator2-server/wiki )

38. http://executeautomation.com/blog/page-object-model-with-appium/ – Page Object Model With Appium

39. https://www.youtube.com/embed/wjvAh4yjwtI?feature=oembed – The Mobile JSON Wire Protocol

40. http://www.testingdiaries.com/appium-android-tutorial/ ( Appium Android Configuration with Eclipse )

41. http://www.testingdiaries.com/appium-ios-setup-native-apps/ ( Appium iOS Setup )

42. http://www.testingdiaries.com/mobile-performance-testing-record-script-jmeter/ ( Mobile Performance Testing )

43. http://www.tabaolan.com/MobileTest/mobile-testing-create-first-appium-webdriver-android-script-in-java/ ( Create First Appium WebDriver Android Script in Java )

44. https://saucelabs.com/resources/articles/appium-bootcamp-chapter-8 ( Finding Information On Your Own )

45. https://seleniumframework.wordpress.com/category/appium/

46. https://seleniumframework.wordpress.com/2015/10/15/mobile-continuous-integration/ ( Mobile CI )

47. Testing iOS App with Appium : Setup Video ( TestObject )

48. Testing Android App with Appium : Setup Video ( TestObject )


49. Build A Basic Appium Framework  ( Adventures in Automation Blog )

50. How To Setup Appium On A Mac – Using Java And Appium Cheatsheet

51. Automating mobile gestures ( Official Appium Documentation )

52. Android Touch Testing ( Official Appium Repository Sample Code )

53. Implicit wait vs Explicit wait usage ( https://discuss.appium.io/t/implicit-explicit-wait-is-not-reliable-to-find-the-element/3871/9https://github.com/appium/java-client/issues/574 )

54. Custom Expected Conditions ( https://gist.github.com/mt1729/fd1e020dede2c18d845151f853a703a6 )


11.  Elements Locator Strategy

>>>  Method 1: ( Appium Desktop Client ) <<<

https://github.com/appium/appium-desktop ( Mac, Windows , Linux )

https://github.com/appium/appium-dot-exe ( Windows Client ) – Deprecated

https://github.com/appium/appium-dot-app  ( Mac Client ) – Deprecated

check setup – click on “Stethoscope – Doctor” button to confirm all is well and then only proceed further

iOS Settings






App Path: The path to the iOS application (.app, .zip, or .ipa) you wish to test.

Choose Button: Used to choose the path to your application.

BundleID: The bundle ID for the application you wish Appium to use (e.g. com.yourCompany.yourApp).

Use Mobile Safari: This will make Appium start the Mobile Safari app instead of using a user-supplied application. BundleID or App Path should both be unchecked when this option is used.

Device Settings

Force Device: This will make Appium force the Simulator to iPhone or iPad mode.

Platform Version: Version of the mobile platform.

Force Orientation: Force the orientation of the Simulator.

UDID: This is the UDID for the mobile device on which you want to run Appium. If this box is checked, Appium will use the attached iOS device. If this field is checked, bundle ID must be supplied and app path should be unchecked.

Show Simulator Log: If checked, the iOS simulator log will be written to the console.

General Settings


Log to File – check this box to log output to a file

Use Colors

Show Timestamps

Use Local Timezone

Android Setting


Make sure to choose correct platform version


Prerequisites ( For Methods 2 & 3 )

http://railsapps.github.io/installrubyonrails-mac.html  ( Install RMV , Ruby ) 

https://discuss.appium.io/t/difference-between-arc-and-irb/1426  ( arc vs irb commands )

Finding Android appActivity and appPackage with help of APK info app


>>>  Method 2: ( Appium Ruby Console ) <<<


( download ebook and refer to below chapters )

https://saucelabs.com/blog/appium-bootcamp-chapter-2-the-console ( appium.txt )

https://saucelabs.com/blog/appium-bootcamp-chapter-3-interrogating-your-app   Interrogating your app



Appium Server Capabilities ( caps.md )

For Android

Android >>> Appium.txt ( emulator )


automationName = “uiautomator2”
platformName = “Android”
deviceName = “placeholder string”
app = “FULL_PATH_IS_MUST/com.flipkart.android.apk”
avd = “Nexus_4_2”   #android list avd

(?? not sure why full path need to be given, even when both appium.txt and .apk are in same directory )


appPackage = “…” #optional

appActivity =”….”  #optional

Android >>> Appium.txt ( Real Device )


automationName = “uiautomator2”
platformName = “Android”
deviceName = “placeholder string”
app = “FULL_PATH_IS_MUST/com.flipkart.android.apk”

#works with any of the connected Android Devices

For iOS

instruments -s devices

xcrun simctl list


iOS >>> Appium.txt ( Simulator )

automationName = “XCUITest”
#comment 1
platformName = “iOS”
app = “/Users/…/Debug-iphonesimulator/XCodeGeneratedTestApplication.app”
#comment 2
deviceName = “iPhone SE”      #needs exact value
platformVersion = “10.2” #https://github.com/appium/appium/issues/7237#issuecomment-267081266     #needs exact value

iOS >>> Appium.txt ( Real Device )

automationName = “XCUITest”
platformName = “iOS”
xcodeConfigFile = “/Users/vikram-anna/../myconfig.xcconfig”
#app = “/Users/../Debug-iphoneos/XCodeGeneratedTestApplication.app”
app = “/Users/vikram-anna/Workspace/../XCodeGeneratedTestApplication.ipa”
#deviceName random comment
deviceName = “Vikram’s iPhone”
platformVersion = “10.2”
udid = “97d9bb791384407fa67df34c07123455efab09”

Refer to https://github.com/appium/appium/issues/6867


Switching to Mobile Browser Context

Driver created with above method points to native app, if you want to work with mobile browser follow below steps

@selenium_driver = @appium_driver.start_driver

Reference : https://github.com/OuchSaray/wikipedia-appium-ruby/blob/cd7069072b3328037689c02be7bc1aaf5ffc58e2/testcases/simple.rb


>>> Method 3: ( irb ) <<<


Goto Terminal in mac , 

in first tab start appium server and 

in second tab execute below steps in irb session  

2.2.1 :001 > require ‘appium_lib’

2.2.1 :002 > caps = {

caps: {

platformName: “iOS”,

deviceName: “Vikram’s Automation iPhone”,


app: ‘/Users/vikram-anna/Library/Developer/Xcode/DerivedData/wunderlist-ddifxljcmzpfdfgvqrmvjoepiisx/Build/Products/Development-iphoneos/Wunderlist.app’,

newCommandTimeout: ‘9999’


appium_lib: {

server_url: ‘;,

wait: 300



2.2.1 :015 > Appium::Driver.new(caps).start_driver

2.2.1 :016 > Appium.promote_appium_methods Object

…then start using methods as below

page , page_class , @driver.find_element(:name , ‘Sign in’).methods

Helpful Links




irb – http://www.tutorialspoint.com/ruby/interactive_ruby.htm

Ruby Regular Expression Editor – http://rubular.com/


>>>  Method 4:  ( Others )  <<<

https://medium.com/@chenchaoyi/the-options-of-inspecting-ios-10-app-with-appium-1-6-534ba166b958#.ni3nhz70t  ( 3 option are mentioned )

Note: Appium Mac Client 1.5.3 

– App Path: /Users/../Xcode/DerivedData/../Build/Products/Debug-iphonesimulator/AppUnderTest.app

( Not working with ipa file created with developer certificate locally ?? )

– Force Device Simulator Name (  instruments -s devices )

– Platform Version Input manually per above command results

–  Start appium server externally

– No need to change any other setting


iOS App Accessibility Inspector


–   Accessibility Inspector YouTube   https://www.youtube.com/watch?v=4BgkVp0v3BM

–   How To Achieve The Best Lookup Performance on iOS ( WDA )

Other Info ( TBR )


http://executeautomation.com/blog/locating-elements-in-appium-part-a/ – Locating Elements In Appium

How To Achieve The Best Lookup Performance


12.  Appium + Selenium Grid / Grid Setup , Parallel Execution

1. http://blog.zymr.com/configuring-appium-node-servers-with-selenium-grid     ( Configuring Appium Node Servers with Selenium Grid )

2. https://www.3pillarglobal.com/insights/parallel-testing-on-multiple-android-devices-using-appium-and-cucumber ( Parallel Testing On Multiple Android Devices Using Appium & Cucumber )

3. https://engineering.naukri.com/2016/04/android-parallel-automation/  ( Jenkins Setup For Parallel Execution )

4. https://essenceoftesting.blogspot.de/2017/02/  ( Jenkins, cucumber-jvm, parallel )

13.  Continuous Integration

https://help.testobject.com/docs/tools/appium/continuous-integration/jenkins-gradle/ ( Running Appium tests through Jenkins using Gradle )


https://testobject.com/blog/2016/06/testobject-appium-setup.html  ( Appium Setup with TestObject )

https://help.testobject.com/docs/tools/appium/setups/ ( Setting up Your Tests )