Setup Appium on MacOS

  1. Install Homebrew:

  2. Install Node.js and Appium:

    brew install node
    npm install -g appium
  3. Install JDK:

    brew install --cask adoptopenjdk
  4. Install Android SDK:

    • Download and install Android Studio from the official website.

    • Open Android Studio and select "Configure" -> "SDK Manager".

    • Under the "SDK Platforms" tab, select the desired Android versions to download.

    • Under the "SDK Tools" tab, select "Android SDK Build-Tools" and "Android Emulator" to install.

  5. Set environment variables:

    • Add the following lines to your .bash_profile or .zshrc file:
      export JAVA_HOME=$(/usr/libexec/java_home)
      export ANDROID_HOME=/Users/<your-username>/Library/Android/sdk
      export PATH=$PATH:$ANDROID_HOME/tools
      export PATH=$PATH:$ANDROID_HOME/platform-tools
      

  6. Install Appium dependencies:

    npm install -g appium-doctor
    appium-doctor --android
    appium-doctor --ios
  7. Connect a physical device or create an emulator:

    • For Android: Connect your Android device via USB, or create an Android emulator using Android Studio.

    • For iOS: Create an iOS simulator using Xcode.

  8. Launch Appium server:

    appium

Last updated