Mobile Device Connection Step by Step Guide

Hi Folks, as we all know that UiPath has just announced its Mobile Device Automation for testing and automating mobile apps. So in this tutorial I will explain a brief of how to connect a real device or emulator to UiPath Studio so that we can begin doing automation on it. Let’s get started.
As I was inching down the UiPath forum, I figure that many people are facing problem in connecting device (be it a real physical device or just an emulator). So, I thought to write my steps and guide you on the procedure that I followed. Be sure to read till end and give me a feedback of how helpful this was.
Kindly note: For this tutorial I will be using Appium as emulator and If you have already installed Android Studio on your system then you don’t need to do anything else just give ANDROID_HOME environment in Appium configuration.
Mobile Automation.pdf (566.0 KB)

Below steps guide you on the process without having the need to install complete Android Studio.

Prerequisites :

  • Java Installed on System - If java is not installed on your system then download from the given link and installed it. https://java.com/en/download/manual.jsp

  • Java_Home is set in Environment variable

  • Check java is installed or not - run command on cmd “java –version”

  • Download and installed Appium (appium.io) for UiPath Mobile Automation

Step 1: Open the link Download Android Studio & App Tools - Android Developers and navigate to the section where is says ‘Command line tools only’ . Then click and download SDK tool package for windows. Make sure to get the latest version that might be different from the one I highlighted in the image below.
some time you faced issue cause of version
you can download latest sdk from Download SDK Tools for Android SDK Manager

Download and extract the files. Note: I rename the extracted folder as Android_sdk for convenient. Below image shows the list of extracted files.

Step 2: Installed Platform Tools. For this open Command Prompt and inside command prompt navigate inside of ‘bin’ folder that in inside the extracted file from Step 1 and run the below command:

sdkmanager “platform-tools” “platforms;android-28”

After that installed Build-tools. Make sure in Command Prompt you are inside ‘bin’ folder and run below command:

sdkmanager "build-tools;28 "

After successful run, installed Android sdk look below
image
Now copy ‘aapt’ and ‘zipalign’ from build-tools and paste it into Tools folder

Step 3: Set Environment Variable

ANDROID_HOME: Location of Android_sdk folder

Path: append the path of Platform_tools folder

Step 4: Now run command ‘adb devices’ on Command line and you will get a list of all the connected devices.
adb

Step 5: Make Device Ready

  • Enable developer mode
  • Make USB debugging ON
  • Enable Installed via USB and security setting Option (if disable)

And for Appium configuration: Install and run Appium on to your system. Make sure to set the configuration as stated in image below.
image

After that you follow the step to Automate Mobile device as provided by UiPath

32 Likes

This is amazing work bro @sandeep13

It will really help the guys who are developing mobie automations… There were so much confusions when it comes to the Appium server as many of us are not from the mobile development background… This really helps…

Great work bro… You are the best!! :smiley:

5 Likes

Thanks @Lahiru.Fernando bro
No Bro… You are the best :laughing:

4 Likes

Will the steps remain same for automating iOS app?

@Ashish_Verma Bro This step for Android Only

1 Like

okay. Much Thanks :slight_smile:

1 Like

Great job bro @sandeep13 :clap::clap:

3 Likes

Thanks @lakshman

3 Likes

I don’t see the same files as yours under tools folder
image

I downloaded the same file as yours:
image

1 Like

I am getting below error

1 Like

Are you completed step 2?

1 Like

@Ashish_Verma
there is may be version issue of sdk tools

download sdk tools
Android SDK Tools 26.2.0 for window then follow same step

1 Like

Now I see all the files available which is there in your screenshot.
This command -sdkmanager “platform-tools” “platforms;android-28” ran successfully.
But, when running below highlighted command , I got an error.

1 Like

I am able to complete all steps but have doubt regarding step 4.
image

I don’t see any device list. Any idea?

2 Likes

are you connect real device via USB with computer?

1 Like

yess. It’s huawei phone

1 Like

are you done this thing?

  • Enable developer mode
  • Make USB debugging ON
1 Like

yup

When I try connecting from studio, the spinner revolves for few seconds and then nothing happens

1 Like

In Uipath what you enter Device name where create device?

1 Like

It is the same name as my phone’s name
image

Looks like something is not correct on appium

1 Like