Windows Prerequisites for MOS

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

  1. 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.

  2. Ensure Java is Installed

    • Install Java version 11 or above.

    • Verify the installation by running the following command in the terminal:

      bash
      

      Copy 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:

      bash
      

      Copy code

      node -v npm -v

Step 2: Install Appium 2.x

  • Open Command Prompt and run the following command to install Appium 2 globally:

    bash
    

    Copy code

    npm install -g appium@2.5.0

Step 3: Verify Appium Installation

  • Verify the installation by running:

    bash
    

    Copy code

    appium --version

Step 4: Install Appium Drivers

Appium 2.x requires separate driver installations based on your use case.

  • Install the Android Driver:

    bash
    

    Copy code

    appium driver install uiautomator2

  • Install the iOS Driver:

    bash
    

    Copy code

    appium driver install xcuitest

Step 5: Configure System Environment Variables

  1. Open Environment Variables

    • Search for Environment Variables in the Windows search bar and open the settings.

    • Click on the Environment Variables button.

  2. 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.

  3. 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.

  4. Update System Path Variables

    • Under System Variables, select Path and 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.

  5. 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.