Appium Tutorial - Step by Step Android Automation

Nishith Shah
3 min readJan 4, 2022

--

Photo by Daniel Romero on Unsplash

Installation

Set Environment Variable and System Path

Here is the Example for MAC

export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-8.jdk/Contents/Home
export
PATH=$PATH:$JAVA_HOME/bin

export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export
PATH=$PATH:$ANDROID_HOME/platform-tools
export
PATH=$PATH:$ANDROID_HOME/tools
export
PATH=$PATH:$ANDROID_HOME/tools/bin
export
PATH=$PATH:$ANDROID_HOME/emulator

Launch the Desktop Application

  1. Launch Android Virtual Device (Android Emulator).
  2. Start Android Server GUI application.
  3. Start Appium Inspector application.

Explore Appium Basic for Android Automation

The most preferable locator strategy is UiSelector.
Example: How to use the text property.
new UiSelector().text(“Connected devices”)

Start Appium Inspectors

Here, we will work on Android In Built application of Settings.
Please add the basic capabilities as shown in the below screenshot then click on Start Session.

After Starting the Appium Server, you will see the similar view in Appium Inspector window.

Click on Search Icon then you will see the different locator strategy in dropdown.
Here, let’s select Android UiAutomator Selector.

Let’s Connect

Let me know — along with any questions, comments, or feedback that you might have on https://www.linkedin.com/in/nshthshah.

--

--