# Appium — Cross-Platform Mobile App Test Automation > Appium is an open-source test automation framework for native, hybrid, and mobile web apps on iOS, Android, and Windows using the WebDriver protocol. ## Install Save in your project root: # Appium — Cross-Platform Mobile App Test Automation ## Quick Use ```bash npm install -g appium appium driver install uiautomator2 appium # In another terminal, run your test script against http://127.0.0.1:4723 ``` ## Introduction Appium lets you write automated tests for native, hybrid, and mobile web applications across iOS and Android using a single API. It builds on the W3C WebDriver protocol so tests can be written in any language with a WebDriver client. Appium does not require recompiling or modifying the app under test. ## What Appium Does - Automates native iOS and Android apps without modifying the app binary - Supports hybrid apps and mobile browsers via the same WebDriver protocol - Provides a plugin-based driver architecture (UiAutomator2, XCUITest, Espresso, etc.) - Enables cross-platform test suites using a single API surface - Integrates with Selenium Grid for parallel test execution on device farms ## Architecture Overview Appium runs as an HTTP server that receives WebDriver-compatible JSON Wire Protocol commands. When a session starts, Appium selects the appropriate driver plugin (e.g., UiAutomator2 for Android) which communicates with the device or simulator via platform-specific automation frameworks. The driver translates WebDriver commands into native automation calls, returns results as JSON, and manages the device lifecycle. ## Self-Hosting & Configuration - Requires Node.js 16+ and platform SDKs (Android SDK or Xcode) - Install drivers per platform: `appium driver install uiautomator2` or `xcuitest` - Configure desired capabilities in JSON to specify device, app path, and platform - Run `appium server` to start the HTTP listener on port 4723 by default - Use `appium plugin install` to extend functionality (e.g., image comparison, wait) ## Key Features - Write tests in Python, Java, JavaScript, Ruby, C#, or any WebDriver client language - No app source code or recompilation required for testing - First-class support for gestures, device rotation, and hardware button simulation - Inspector tool provides a visual element tree for building selectors - Active plugin and driver ecosystem maintained by the community ## Comparison with Similar Tools - **Detox** — React Native focused with gray-box synchronization; Appium is platform-agnostic and black-box - **Espresso** — Google's Android-only white-box framework; Appium works across both iOS and Android - **XCUITest** — Apple's native iOS testing framework; Appium wraps it behind a cross-platform API - **Maestro** — YAML-driven mobile testing with simpler setup; Appium offers deeper control and broader language support - **Selenium** — web browser automation; Appium extends the same protocol to mobile devices ## FAQ **Q: Does Appium support Flutter apps?** A: Yes, via the community-maintained `appium-flutter-driver` which communicates with Flutter's test API. **Q: Can I run Appium tests on real devices?** A: Yes, connect a device via USB or use cloud device farms like BrowserStack or Sauce Labs. **Q: What is the difference between Appium 1.x and 2.x?** A: Appium 2.x uses a plugin and driver architecture, removing bundled drivers and allowing independent updates. **Q: Does Appium work with CI/CD pipelines?** A: Yes, Appium runs as a standard server process and integrates with Jenkins, GitHub Actions, and any CI tool. ## Sources - https://github.com/appium/appium - https://appium.io/docs/en/latest/ --- Source: https://tokrepo.com/en/workflows/d86611c6-3f52-11f1-9bc6-00163e2b0d79 Author: AI Open Source