In this article, we will see basic setup of Appium, where we can run appium tests on mobile handset or tablet or mobile emulators
Refer below links to know the concept behind appium
Follow the below steps one by one to accomplish the appium setup…
Step1 : For the selenium setup
please refer First selenium test using Maven & testNG in Java
Step2 : Android & iOS setup
For Android – Install Android SDK
http://developer.android.com/sdk/index.html#downloads
Open the above link and scroll down to the section “Android Studio downloads”, chose the recommended option and install (select a folder to install)
Open Android Studio,
Tools | SDK Manager

Android SDK Location: enter the folder path where you want to download all the packages
For e.g - /Users/MyUser/Library/Android/SDK
Find these below 2 tabs and select following options to install packages
Tab 1 – “SDK Tools”
- Android SDK Platform-tools
- Android SDK Build-tools
- Android SDK Tools
- Android Emulator
- Google USB driver
- Google play services
Tab 2 – “SDK Platforms”
- Respective Android API level (i.e which version of android OS running on your mobile)
[e.g – Android 8.1 (API 27)]
Set environmental variable:
[How to : set Env variable]
Add environmental variable
variable name : ANDROID_HOME
value: /Users/MyUser/Library/Android/SDK
Edit environmental variable
variable name: path
value: ;/Users/MyUser/Library/Android/SDK/tools;
/Users/MyUser/Library/Android/SDK/platform-tools;
For iOS – install xcode
Download from here
xcode will have all the iPhone model simulators along with iPads, you can install specific iOS versions from the Xcode > Preferences
Step3 : Enable Developer options
On Android mobiles or tablets
- navigate to Settings > About / About phone
- Scroll down and tap around 7 times on Build number
- Confirmation popup comes with text “Developer mode has been enabled” or “you are now a developer”
- Now come back to Settings, and you can see Developer options, turn ON this option.
- Now connect mobile / tablet to the computer, you will see device shows “USB debugging connected”
Step4 : ADB commands for android
Get android device information by ADB commands
[Device can be mobile, tablet or emulators]
Connect device to computer in debug mode or open android simulator,
then, open command prompt and type
adb devices
: lists devices connected to computer
List of devices attached emulator-5554 device
If in case, adb devices shows no result, better to use below troubleshooting steps:
type: adb kill-server and key press enter
then, adb start-server and key press enter
then try, adb devices [you should be able to see the device details now]
Note: From the above screenshot, adb devices have any one of the states
[Serial number] [state]
if device is connected, then state shows “device”,
if device is not connected properlly or not responding, then state shows “offline”
If no device connected, then result will be blank
Solution if adb command doesn’t work directly from start –> Run
Navigate to the platform-tools folder under AndroidSDKInstall folder, key press SHIFT and right click then select “Open command prompt here”, now adb command should work.
reference https://developer.android.com/studio/command-line/adb.html
Get iOS device information
xcrun simctl list | egrep '(Booted)'
this will list the current ios device or simulator that is active or booted.
Step5 : Download Appium language bindings
We use java language to automate, You can use the java-client maven dependency into your maven pom.xml
https://mvnrepository.com/artifact/io.appium/java-client
Step6 : Install Appium GUI
Navigate to this link and download latest appium for desktop zip file
https://github.com/appium/appium-desktop/releases
install and open the exe to get window as shown below sceeenshot
Step7 : download and install node.js
Navigate to https://nodejs.org/en/download/
Select respective installer (32 or 64 bit) depending on your OS to download and install as usual way.

If you are done with the setup, then follow below video for the demo
6 Comments