Professional Documents
Culture Documents
1
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.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
2
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
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
4
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
5
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.
The main Android environment variables that you would have to set are A
NDROID_HOME
and P
ath variables.
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
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
7
5. C
lick on OK button. ANDROID_HOME variable will now be added to System variables
8
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 –
9
;%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
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
13
You will see the selected AVD on your screen as shown below.
14
When installation finished, double-click the appium icon and open the appium server as
shown below.
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”.
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”.
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.
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.
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.