Latest Version: Appium 1.3.1 , 1.3.2

Android Version : nougat 7.0  (stable) API Leve 24-5 , Latest : oreo -8.0, API Level 26-27

xcode version 8.2.1

  • Appium is open source and Free tool
  • Appium is used for automating Android and iOS.
  • It supports all three types of applications such as Native, Web, Hybrid
  • It support  multiple programming languages ( java, c#, perl, python, ruby, java script, etc)
  • It supports any framework.
  • You shouldn’t have to recompile your app or modify it in any way in order to automate it.
  • Can not automate toast messages.
  • Require android 4.2+
Appium Architecture
  • Test script invokes appium server that internally uses apple instrumentation to communicate with iOS device.
  • Test script invokes appium server that internally uses ui automator viewer if android api version >=17 other wise it uses selendroid to communicate with device.


  • Variant size of mobile devices (phone, tablet) etc, need to make sure the app works.
  • Variant mobile platforms Android, Web.
  • Mobile apps have smaller memory comparatively desktop/web apps.

Software Required

  • Java
  • Android SDK
  • Appium Server
  • Appium Java Client
  • Eclipse
  • GSON Jars – convert java objects to json string and vice versa.
  • Node and NPM – only for running appium server on command line
    • it can be installed in mac by using homebrew
  • XCODE – only for iOS, used for working with simulators
  • Homebrew – only for mac platform used for installing any required softwares.
Working with Appium on Android
  • Install softwares required as mentioned in “Software Required” Section
  • set up SDK Manager
  • Create a project in eclipse, add selenium, and appium client java libraries
  • Create Android/iOS Driver
  • Find Element, Perform actions, close App
Finding Locators


  • Native – Appium Inspector
  • Web – Safari Browser


  • Native – UIAutomatorViewer, Appium Inspector
  • Web – Chrome ADB Plugin
Appium Locators
  • Name (Text),  Id(Resource Id),  ClassName, TagName, 
  • AccessibilityID (Content-Desc), XPath, CSS, LinkText, PartialLinkText
  • General
    • MobileCapabilityType.PLATFORM_NAME
    • MobileCapabilityType.PLATFORM_VERSION
    • MobileCapabilityType.DEVICE_NAME ( use Android emulator if working on emulator)
    • avd (only for emulator, use emulator name ex “Nexus_4_API_21” )

  • Android
    • AndroidMobileCapabilityType.APP_PACKAGE
    • AndroidMobileCapabilityType.APP_ACTIVITY
    • MobileCapabilityType.APP (app path when you not aware of package, and activity)
  • iOS
    • MobileCapabilityType.APP (app path)
Sample Program
  • DesiredCapabilities caps = new DesiredCapabilities();
    • caps.setCapability(MobileCapabilityType.PLATFORM_NAME, “Android”);
    •  caps.setCapability(MobileCapabilityType.PLATFORM_VERSION, “5.0.2”);
    •  //if its real device, give actual device name
    •  caps.setCapability(MobileCapabilityType.DEVICE_NAME, “Android emulator”);
    •  caps.setCapability(“avd”, “Nexus_4_API_21”); //is not required if its real device
    •   //Identifiying application using desired capabilities – for android
    • caps.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, “”);
    • caps.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, “”);
    • //Create Android Driver
  • AndroidDriver driver = new AndroidDriver(new URL(“”), caps);
  • driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  • WebElement digit8 = driver.findElement(“”));
  • driver.closeApp()
  • Mobile gestures
    • long press
    • drag and drop
  • Handling alerts
  • spinners
  • drop downs
  • switch button
  • slide seek bar
  • Swipe
  • Zoom
  • Capturing screenshots
  • Capturing screenshots on test failure
  • scroll up or scroll down
Example Code on Actions

TouchAction tAction=new TouchAction(driver);
Drag N Drop
WebElement appsIcon=driver.findElementByAccessibilityId(“Apps”);;

WebElement calculator=driver.findElementByName(“Calculator”);
TouchAction action=new TouchAction(driver);;
action.moveTo(driver.findElement(“App info”))).release().perform();