---Advertisement---

Appium Tutorial for Mobile App Testing: Android & iOS Automation Guide Best 2025

By Manisha

Updated On:

---Advertisement---
Appium Tutorial for Mobile App Testing

📌Appium Tutorial for Mobile App Testing

Appium Tutorial for Mobile App Testing : Appium is a free and open-source test automation framework designed for mobile application UI testing. It supports testing for native, hybrid, and web apps on both Android and iOS platforms. With Appium, you can run automation tests on real devices, emulators, or simulators using a single API across platforms.

Unlike other tools, Appium does not depend on the underlying OS. It uses a wrapper that translates Selenium WebDriver commands into platform-specific commands—UIAutomator (Android) or UIAutomation (iOS)—based on the device.

Appium supports various programming languages, including:

  • Java
  • C#
  • Python
  • Ruby
  • JavaScript (Node.js)
  • PHP
  • Objective-C

📌How Appium Works Internally

Appium Tutorial for Mobile App Testing : Appium is built on the Node.js platform and acts as an HTTP server. It communicates with devices using the WebDriver JSON Wire Protocol.

  1. Install Node.js – Required before installing Appium.
  2. Start Appium Server – Sets up a REST API locally.
  3. Client Sends Command – Appium receives requests from test scripts.
  4. Command Execution – Executes commands using automation frameworks:
    • iOS: Apple Instruments (Xcode 3.0+)
    • Android: UIAutomator (API 16+), Selendroid (API ≤ 15)

📌Prerequisites for Using Appium

Appium Tutorial for Mobile App Testing : To start with Appium automation, install the following tools:

  • Android SDK / Android Studio
  • Java Development Kit (JDK)
  • Eclipse IDE
  • TestNG plugin for Eclipse
  • Selenium Server JAR
  • Appium Client Libraries
  • Appium Desktop
  • Node.js (Optional – comes with Appium by default)

📌Installing Appium Desktop

  1. Visit and download the Appium Desktop.
  2. For Windows, download the .exe (around 162MB).
  3. Run the executable file directly without installation.
  4. For macOS, download the .dmg file and install.
  5. Launch Appium Server and verify default host (127.0.0.1) and port (4723).
  6. Click Start ServerNew Session Window → Enter Desired Capabilities.

📌Using Appium Inspector

Appium Tutorial for Mobile App Testing : Appium Inspector is similar to Selenium IDE and is used to inspect elements and record actions. It currently does not support Windows, but you can use UIAutomator Viewer as an alternative.

  1. Launch Appium Server.
  2. Browse and select the .app file to test.
  3. Start Simulator.
  4. Click Launch Inspector → View element tree and actions.
  5. Use features like Tap, Swipe, etc.
  6. Click Stop to end recording.

📌Connecting Android Emulator with Appium

  1. Install Android SDK and set ANDROID_HOME in Environment Variables.
  2. Launch emulator or connect real device with Developer Mode and USB Debugging enabled.
  3. Open CMD → Navigate to \platform-tools\
  4. Run adb devices to list connected devices.
  5. Start ADB Server: adb start-server
  6. Launch Appium from .exe and start server.

📌Creating Appium Test Case for Android App (Calculator Example)

  1. Install Eclipse and create a Java Project with TestNG.
  2. Import Selenium and Appium libraries.
  3. Write a test case for Calculator app to sum two numbers.
  4. Run tests using TestNG → Results appear in console.

📌Appium Limitations

  • No support for Android versions below 4.2.
  • Limited hybrid app support (can’t switch between native and web views smoothly).
  • Appium Inspector not available for Windows.

📌Common Errors and Troubleshooting

ErrorSolution
Desired capabilities missing: deviceName, platformNameAdd them in script: cap.setCapability(“deviceName”, “Emulator”)
adb not foundSet ANDROID_HOME path in system variables
SessionNotCreatedExceptionVerify app path and restart Appium

📌Locating Mobile Elements

Appium Tutorial for Mobile App Testing : Use UIAutomatorViewer (part of Android SDK) to inspect UI elements and capture XPath or element locators for Android applications.


If you’d like, I can break this article into individual blog sections like:

  • Appium Setup
  • Emulator Configuration
  • Writing First Test Case
  • Using Appium Inspector
    Let me know and I’ll format them accordingly for better SEO impact and readability.

Click To Open

👉Tutorial-1: UIAutomatorViewer
👉Tutorial-2: Appium Desired Capabilities
👉Tutorial-3: Android Debug Bridge (ADB)
👉Tutorial-4: Appium Maven Dependency
👉Tutorial-5: Appium Interview Questions

Appium Website

Mobile Emulator Testing

Leave a Comment

Index