Windows Prerequisites for MOS: Appium 2 Installation
Follow these steps to set up Appium 2 on a Windows system, along with the required prerequisites:
Prerequisites
-
Download and Install Android SDK
-
Download and install the Android SDK from the official Android Studio website.
-
If you're not working with a real device, create an emulator.
-
-
Ensure Java is Installed
-
Install Java version 11 or above.
-
Verify the installation by running the following command in the terminal:
bashCopy code
java -version
-
Steps to Install Appium 2 on Windows
Step 1: Install Node.js
-
Download and Install
-
Download the latest LTS version of Node.js from the official Node.js website.
-
Ensure Node.js version > 14 and npm version >= 8.
-
-
-
Verify Installation
-
After installation, open Command Prompt and run the following commands:
bashCopy code
node -v npm -v
-
Step 2: Install Appium 2.x
-
Open Command Prompt and run the following command to install Appium 2 globally:
bashCopy code
npm install -g appium@2.5.0
Step 3: Verify Appium Installation
-
Verify the installation by running:
bashCopy code
appium --version
Step 4: Install Appium Drivers
Appium 2.x requires separate driver installations based on your use case.
-
Install the Android Driver:
bashCopy code
appium driver install uiautomator2 -
Install the iOS Driver:
bashCopy code
appium driver install xcuitest
Step 5: Configure System Environment Variables
-
Open Environment Variables
-
Search for Environment Variables in the Windows search bar and open the settings.
-
Click on the Environment Variables button.
-
-
Set ANDROID_HOME Path
-
Under User Variables, click New and add the following:
-
Variable Name:
ANDROID_HOME -
Variable Value:
C:\Users\<User_Name>\AppData\Local\Android\Sdk
-
-
Click OK to save.
-
-
Set JAVA_HOME Path
-
Under User Variables, click New and add the following:
-
Variable Name:
JAVA_HOME -
Variable Value:
C:\Program Files\Zulu\zulu-11(or the path to your installed Java version).
-
-
Click OK to save.
-
-
Update System Path Variables
-
Under System Variables, select
Pathand click Edit. -
Click New and add the following paths:
-
C:\Users\<User_Name>\AppData\Local\Android\Sdk\emulator -
C:\Users\<User_Name>\AppData\Local\Android\Sdk\platform-tools
-
-
Click OK to save changes.
-
-
Apply Changes
-
Click OK to close all dialogs and apply the settings.
-
You’re All Set!
Appium 2 is now installed and configured. You can start using it with the configured environment.