To execute the examples over the Android platform you'll need:

  • NodeJs

  • Android SDK

  • Install Android Simulator

  • Appium


Install Android Studio And Simulator

Install NodeJs


  • If the Nodejs is successfully installed and still displays the message like this:

    'npm' is not recognized as an internal or external command, operable program or batch file.

    Follow the steps below for Windows users:

    1. Go to My Computer Properties

    2. Click Advanced System Setting from the Left bar of a window.

    3. Now you have a System Properties window. Click Advanced

    4. Then, Click Environment Variable button

    5. Now you have Environment variable window: From System Variable, Select Path

    6. Click Edit

    7. At the end of the Variable value, add ;C:\Program Files\nodejs\

      Note: If you have installed nodejs on other drives then please act accordingly.

    8. Click Ok all the open dialogue box

    Very important Note: "Close your Command Prompt And Restart Again" (It's very important because if you didn't restart your command prompt then changes will not be reflected.)

    Now you can use the npm command anywhere

Install Appium

  • Run command: npm install -g appium

  • If permission issues: sudo npm install -g appium --unsafe-perm=true --allow-root

  • Check version in command line:

  • appium --version

Install Appium Desktop

Setup Inspector

  • Launch Appium and Start Server

  • Select "Start Inspector Session" (magnifying glass, top right icon)

  • Setup Desired Capabilities:

    • platforName: Android

    • automationName: UiAutomator2

    • avd: Simulator name

      • Real Android device:

        • Connect a real Android device to your computer

        • Command prompt: adb devices

        • Device name: ENUL6303030010

        • In Appium Set: UDID: ENUL6303030010 (do not set avd)

  • app: location of apk file

  • deviceName: Android

  • {
    "platformName": "Android",
    "automationName": "UiAutomator2",
    "avd": "Pixel_C_API_25",
    "app": "/Users/Shared/Jenkins/Documents/Selenium/autonomx/autonomx-client/autonomx/automation/resources/selendroid.apk",
    "deviceName": "Android"
  • Start Session

  • The app and the page source will be displayed side by side

UiAutomator Viewer

Android Test Setup