You are on page 1of 30

 

  

Requirement for Mobile 


Automation 
06/24/2020 
─ 

 

 

Overview 
In order to automate the android mobile application below are the few desired applications 
which need to be configured properly. 
1. Android Studio 
2. Appium Server 
3. Node JS 
4. Eclipse IDE 
5. JDK 

Goals 
The purpose of this document is to explain the installation of all the desired 
applications which are needed for android mobile application automation. 

Applications 
Android Studio 
 
Step 1.1: D
​ ownload and Install Android Studio 

Step 1.2: I​ nstall additional Android SDK tools 

Step 1.3: S
​ etup Android Environment Variables 

 
Android Studio:​ Android Studio is the official IDE for creating Android apps. When 
you install Android Studio, SDK tools come bundled with it 

 

1. O
​ pen Android Studio download link – 
https://developer.android.com/studio/index.html​. You will see ​Download Android 
Studio​ button as shown below 

2. C
​ lick on the Download​ Android Studio​ button. You will see the T
​ erms and 
Conditions​ popup 

 

3. S
​ elect the checkbox and click on ​DOWNLOAD ANDROID STUDIO FOR WINDOWS 
button. 
 
4. A
​ ndroid Studio Bundle would get downloaded to your machine 

 

This completes our Android studio download process. Now install the SDK tools. 
 
1. D
​ ouble click on the downloaded exe file. Android Studio Setup Welcome Screen would 
be displayed, as shown below (sometimes it might take a minute or so for the below screen 
to load when you try it the first time) 

2. C
​ lick on the Next button. You will see the Choose Components screen. On this screen, l​ et 
both checkboxe remain selected.​ You would observe that Android SDK (which you need 

 

for Appium Scripts) is not displayed here. But once you install Android Studio, and open it 
for the first time then you will see the option to download Android SDK as well. 

Setup Android Environment Variables 

The main Android environment variables that you would have to set are A
​ NDROID_HOME 
and P
​ ath​ variables. 

Find the folder location where you installed Android SDK 

In the first step we will try to find the folder path where we have installed Android SDK – 

1. T
​ he default folder location where Android SDK is installed is – 
C:\Users\Anish\AppData\Local\Android\sdk​. Please open this folder path and see if you 
have Android SDK folder in there with contents as shown below  

2. C
​ opy the SDK folder location once you find it. For us, this folder location is – 
C:\Users\Anish\AppData\Local\Android\sdk 

Setup Android Environment Variables – Setup ANDROID_HOME 



 

Follow the steps given below to setup ANDROID_HOME environment variable – 

1. C
​ lick on the Start menu. Then right click on Computer and select Properties option 

2. T
​ his would open the S
​ ystem Properties​ window as shown below. Now from the 
Advanced​ Tab, click on E​ nvironment Variables​ button 

3. F
​ rom the Environment Variables window, click on N
​ ew​ button from S
​ ystem variables 
section 

 

4. E​ nter ​ANDROID_HOME​ in Variable Name field and SDK folder location 


(​C:\Users\Anish\AppData\Local\Android\sdk​) in Variable value field as shown in below 
image (Please enter the correct folder location that you have in your machine) 

5. C
​ lick on OK button. ​ANDROID_HOME​ variable will now be added to System variables 

 

Setup Path Variable 

Follow the steps given below to setup Path variable – 

1. I​ n the Environment variables window, check that there is a variable called Path under 
System variables 

2. S
​ elect the Path variable and click on Edit button. Path variable window would be opened 

3. M
​ ove over to the end in the Variable value text field. Put a semicolon (;) at the end and 
start adding all the 3 folder paths separated by semicolon (Semicolon acts as a delimiter 
between different folder locations added in the Path variable). You should have added all 
the 3 folder locations as this – 

 

;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;%ANDROID_HOME%\t
ools\bin 

4. C
​ lick on the OK button. All the three variables would now be added to the Path variables. 

5. C
​ lose the Environment variable window by clicking on the Ok button. With this, we have 
now successfully setup Path variable as well 

Virtual Device 

Click to “​+ Create a Virtual Device​” button, once android studio gets installed successfully 
10 
 

Then, select a virtual device in the device list. 

 
11 
 

In this example, I selected Android 7.0. I have also a test device and its version is also 7.0 
but you can select any of them. Click the download link and download the required libraries 
for the selected version. 

After downloading the required libraries, click “next” to continue and click Finish button. 
12 
 

Then, click the run icon and launch your device. 

 
13 
 

You will see the selected AVD on your screen as shown below. 

 
 

Appium Desktop Installation and Configurations 


Go to h
​ ttp://appium.io/downloads.html​ and click “​Appium-Desktop for OSX, Windows 
and Linux​” link. 

On the page below, click “​appium-desktop-Setup-1.17.1.exe​” file.  


When the installation file is downloaded, click run and start to install a
​ ppium desktop​. 

 
14 
 

When installation finished, double-click the appium icon and open the appium server as
shown below.

Le​t’s click the “​Advanced​” tab and change the Server Address as “​127.0.0.1​” and click Allow 
Session Override for override session when there will be problems and click “Start Server”. 
If you will use a real device and then use “​0.0.0.0​” for “​Server Adress”​. 
15 
 

Let’s click the “​Advanced​” tab and change the Server Address as “​127.0.0.1​” and click Allow 
Session Override for override session when there will be problems and click “Start Server”. 
If you will use a real device and then use “​0.0.0.0​” for “​Server Adress”​. 

 
 

.Give the required permission to A


​ ppium Server. 

 
16 
 

 
 
You will see the server up and running. 

 
17 
 

 
 
 
 

Node.Js 
Appium is an HTTP server written in node.js which creates and handles multiple WebDriver 
sessions for different platforms like iOS and Android. The interaction between node.js 
server and Selenium client libraries is what ultimately works together with the mobile 
application. 

 
Download and Install Node.Js 

 
1) Visit the N
​ ode.JS​ website to download N
​ ode.JS​. Scroll down a little bit to find the correct 
installer for your OS version. 
18 
 

 
2) The File Download dialog box appears prompting you to ​Save​ the download file. 

 
3) Once the downloading is complete, d
​ ouble click​ the file to begin the installation of 
Node.JS​. 
 
19 
 

 
4) To run the installer, click ​Run​. 

 
5) The installation process starts. Click the ​Next​ button to continue the installation. 

 
20 
 

 
6) Select the radio button to “​Accept the terms in the License Agreement​” and c​ lick​ on 
Next​ ​to proceed. 
21 
 

 
 
7) During the initial installation, the window will ask you where you want to install the files. 
You can choose to change where you want to keep your folder but it’s best to stick with 
what you were given first. Click N ​ ext​ to continue. 
22 
 

 
8) On the next screen you will encounter some options. Just leave these alone and click 
Next​ unless you know what you are doing. 
 
23 
 

 
9) Click on N
​ ext​ to start the main installation. 

 
24 
 

 
 
10) Let the installation finish and now take the last steps of the installation process; click 
Close​ ​on the last dialog. This will complete Java installation process. 

 
25 
 

 
 
 

JDK 
 
Install JDK (Java Development Kit) 

Download and install Java (JDK) and set a path of JDK and bin folder. 

● Download the “.exe” file from h


​ ere (​ V
​ ersion: j​ dk1.8.0_91 or whichever is the 
latest you find there). 
● Install the “.exe” file. 
● Setup the JDK bin folder path in your system’s environment variable. 

Set JDK Path In Windows 

1. Note down the path where the JDK is installed in the system. 
26 
 

2. Copy the path until/bin folder because that is where the java application is found. 
3. Now, Open Control Panel -> System -> Advanced System Settings -> Environmental 
Variables -> Click New. 
a.  

 
 

4. Once you click on OK, the variable should reflect in the list of environmental 
variables set. 

Eclipse IDE 
In order to run the Java application, we need to set up eclipse. Follow the instructions given
below to install the eclipse and configure to execute the JavaFX application.

1. Download the Latest version from ​https://www.eclipse.org/downloads/​ j​ust Click on


DOWNLOAD​ button to download the installer. 
2. Double click on the ​exe​ file which has just been downloaded. The screen will look
like the following. Click ​Run​ to proceed the installation.
27 
 

3. Choose the software suit which you want to install. In our case, we have chosen
Eclipse IDE for Java Developers​ which is recommended in our case.
28 
 

4. Just click install when you are done with the directory selection.The set up will ask us
to accept the Eclipse Foundation Software Agreement. Just click ​Accept​ to continue.
5. Once the installation will be done, the following screen will appear. Just click the
LAUNCH​ button to launch eclipse.
6. Browse the workspace directory, just click the ​Launch​ button once you done with
the process.
29 
 

7. The screen will appear like the following. Now, we are all set to configure Eclipse in
order to run the Java application.

You might also like