This Tutorial Explains How to Download, Install and Setup Appium for Windows. It also Includes the Video Tutorial for Step by Step Installation Of Software:
Appium is an open-source project which can test Mobile Applications automatically.
Before you can use it to run a test case for a mobile application, you need to set up the test environment for the execution of it first.
What You Will Learn:
- Basic Installation Steps And System Setup For Appium
Basic Installation Steps And System Setup For Appium
Here is a Video Tutorial:
Appium Installation and Setup – Part – I
Appium Installation and Setup – Part – II
Let’s see the step by step process of how to set up the Appium Test environment in detail.
Install JDK (Java Development Kit)
Download and install Java (JDK) and set a path of JDK and bin folder.
- Download the “.exe” file from here (Version: jdk1.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.
#2) Copy the path until/bin folder because that is where the java application is found.
In this case, the path is C:\Program Files\Java\jdk1.8.0_144\bin.
#3) Now, Open Control Panel -> System -> Advanced System Settings -> Environmental Variables -> Click New.
#4) Once you click on OK, the variable should reflect in the list of environmental variables set.
#5) To make sure that the system can recognize the Java that is installed, go to the command prompt and type ‘java –version’. This should return the latest version of the JDK installed in the system.
Install Android SDK (Software Development Kit)
#1) Download the Android SDK from here.
#2) Click on the link “android-sdk_r24.4.1-windows.zip” (or whichever is the latest you find there) and then click on the download button.
#3) Once the zip file gets downloaded, unzip the folder.
The folder structure will look as shown below:
#4) Now click on the “SDK Manager.exe” file.
#5) This opens the Android SDK Manager window. Select “Tools” and the Android platform on which you will be performing your tests.
Set SDK Path In Windows
#1) Note down the path where the Android SDK is installed.
#2) Click on Environment Variables -> Create a new user variable ANDROID_HOME -> and set the Android SDK path as the value for it.
#3) Set 2 paths in the system variable Path:
- Path of the “platform-tools” folder in the Android SDK bundle (For Example, C:\User Files\Appium Automation\Android\android-sdk\platform-tools).
- Path of the “tools” folder in the Android SDK bundle (For Example, C:\User Files\Appium Automation\Android\android-sdk\tools).
Now, to verify whether Android is configured properly in our system or not, run command “android” in the command prompt. This, in turn, opens the Android SDK Manager application, which verifies the successful configuration of Android in our system.
#1) Open the Appium Official link.
#2) Click on the Download link.
#3) Select the OS of the machine that you are working on and download the appropriate version.
#4) Unzip the downloaded zip folder.
#5) Install the .exe file “appium-installer”.
#6) Specify the path for installation.
#7) After installation, the folder structure of Appium looks as shown below.
Configure Appium After Installation
#1) Launch the application and click on the Android Settings button at the top left corner of the Appium window.
#2) Select Platform Name as Android for versions greater than 17 (or else Use Selendroid), Automation Name as Appium and Platform version as your device’s OS version.
#1) Click on the General Settings button.
#2) Note down the Server Address and the Port Number. You’ll require it during Automation Script creation.
Node.js comes along with Appium. But in some cases, it doesn’t work. So to be on the safer side, install it separately
- Visit this link.
- Click on the Windows Installer tab.
- Download Starts.
- Install it.
Install PDA NET+
This helps to connect the mobile device with a system in the USB debug mode.
To download and install PDANet+ on your machine, follow these steps:
- Go to the PDANet link.
- Download and install it.
This helps to create Virtual devices/ emulators. We have AVD in the Android SDK bundle. But Andoird Virtual Device Manager (AVD) is quite slow in launching emulators. So, GenyMotion is an alternative option in such cases.
- Go to the GenyMotion link.
- Create a new Account there.
- Log in using the same credentials.
- Click on the Download tab.
- Click on the “Download with Virtual Box” link.
- Install it.
Selenium Jar Files
This is required for the interaction between your test scripts and the Selenium WebDriver.
#1) Go to the Selenium link.
#2) Click on the Download link here for the latest JAR available (selenium server standalone and java client library jar files).
#3) Extract the downloaded zip folder.
Add the Libraries to the Project:
#1) Open Eclipse IDE.
#2) Create a new Java Project -> Create a new package under this project -> Create a new class under this package.
#3) Right-click on your Project name -> Select Build Path -> Select Configure Build Path.
#4) Click on the “Add External JARs” button -> go to the path where you have saved the Selenium WebDriver zip folder.
#5) Select both the .jar files from here.
#6) Now select all the .jar files inside the libs folder here.
#7) Jar files are added as a part of the project dependencies as shown below.
Appium Client Libraries
We require language-specific client drivers. As we will be working on Java, we will require the Java client drivers.
#1) Go to the Appium link.
#2) Click on the Java link under the Appium Client Libraries section.
#3) Click on the JAR link here.
#4) Download Starts.
Configure Library file (all dependencies) with Project:
- Right-click on your Project name -> Select Build Path -> Select Configure Build Path.
- Click on the “Add External JARs” button -> go to the path where you have saved the Java Client jar file.
- Now select the jar file and add it.
- Jar file gets added as a part of the project dependencies as shown below.
In this tutorial, we have seen the step by step process to set up the Appium test environment. These include the installation of JDK, Android SDK, Appium, Node.Js, and other required tools/software for the Appium test environment.
Our upcoming tutorial will explain how to configure a real-time mobile device with the system for Automation with Appium.