
📌Appium Tutorial for Mobile App Testing
What is Appium?
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.
Appium Flow:
- Install Node.js – Required before installing Appium.
- Start Appium Server – Sets up a REST API locally.
- Client Sends Command – Appium receives requests from test scripts.
- Command Execution – Executes commands using automation frameworks:
- iOS: Apple Instruments (Xcode 3.0+)
- Android: UIAutomator (API 16+), Selendroid (API ≤ 15)
- iOS: Apple Instruments (Xcode 3.0+)
📌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
- Visit and download the Appium Desktop.
- For Windows, download the .exe (around 162MB).
- Run the executable file directly without installation.
- For macOS, download the .dmg file and install.
- Launch Appium Server and verify default host (127.0.0.1) and port (4723).
- Click Start Server → New 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.
Steps (macOS):
- Launch Appium Server.
- Browse and select the .app file to test.
- Start Simulator.
- Click Launch Inspector → View element tree and actions.
- Use features like Tap, Swipe, etc.
- Click Stop to end recording.
📌Connecting Android Emulator with Appium
- Install Android SDK and set ANDROID_HOME in Environment Variables.
- Launch emulator or connect real device with Developer Mode and USB Debugging enabled.
- Open CMD → Navigate to \platform-tools\
- Run adb devices to list connected devices.
- Start ADB Server: adb start-server
- Launch Appium from .exe and start server.
📌Creating Appium Test Case for Android App (Calculator Example)
- Install Eclipse and create a Java Project with TestNG.
- Import Selenium and Appium libraries.
- Write a test case for Calculator app to sum two numbers.
- 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
Error | Solution |
Desired capabilities missing: deviceName, platformName | Add them in script: cap.setCapability(“deviceName”, “Emulator”) |
adb not found | Set ANDROID_HOME path in system variables |
SessionNotCreatedException | Verify 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