DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

Mobile Test Automation with Appium: An Introduction

Appium provides a shared WebDriver API for mobile UI automation, while platform drivers determine the actual capabilities and setup. Follow an Android UiAutomator2 path from SDK prerequisites to a first Python test.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Appium lets a test script automate mobile apps through a common WebDriver API, but it does not make Android and Apple platforms behave identically. An Appium server receives commands from a language client, and a separately installed platform driver translates them into the automation technology available on the target. For a first Android test, the most direct path is Appium with the UiAutomator2 driver, an Android emulator or device, and a client script.

What Appium does—and what it does not do

Appium is an open-source UI automation server and ecosystem. Its API adopts the WebDriver specification, so a test can use familiar session and element commands. Appium itself does not directly automate every platform: a driver maps supported commands to platform-specific automation tools. As a result, the common API is a starting point, not a guarantee that every command works on every platform or app type. See the Appium introduction.

As an Amazon Associate I earn from qualifying purchases.

Appium is also not a test runner or test framework. Your chosen language client sends commands; a framework such as Python’s unittest, or another runner, can organize test cases and assertions. The client and Appium server communicate over HTTP and may run on separate computers, which also allows a cloud service to host the server and devices. See the Appium architecture overview.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a driver for the target

Drivers are installed separately. Pick one according to the operating system, whether the app is native, hybrid, or web, and the driver’s current maintenance status. Appium’s driver catalog, dated 2026-10-01, distinguishes team-maintained drivers from other community or third-party entries; check it before building a test around a driver.

Driver Target Modes listed Practical note
UiAutomator2 Android Native, hybrid, web The clearest first Android route in Appium’s quickstart.
Espresso Android See current driver catalog An additional official Android driver; consult its current documentation for prerequisites and behavior.
XCUITest iOS, iPadOS, tvOS, watchOS Native, hybrid, web Team-maintained; driver use requires macOS. Consult its current guide for Apple’s toolchain, signing, and device or simulator specifics.

Mode availability and behavior are driver-specific; do not assume a command supported by one driver is available through another. The driver catalog is current as of its 2026-10-01 page date. For a first test below, the guide uses UiAutomator2 on Android.

Prepare an Android target

The official UiAutomator2 setup path requires Appium, Android SDK components, and a Java JDK. An Android Studio-created Virtual Device is sufficient for learning; a physical phone is optional. The official UiAutomator2 setup guide describes the prerequisites and device choices.

  1. Install Appium. Follow the getting-started guide for the version and host requirements appropriate to your environment.
  2. Install Android SDK components. Install Android SDK Platform and Platform-Tools, for example through Android Studio’s SDK Manager. Configure ANDROID_HOME to point to the SDK installation.
  3. Install a Java JDK. Configure JAVA_HOME to identify the JDK installation.
  4. Start a target. Create and launch an Android Virtual Device in Android Studio, or connect a development-enabled Android device with USB debugging enabled.
  5. Confirm ADB can see it. Run adb devices. Check that the intended emulator or device appears before continuing.
  6. Install and validate the driver. Run appium driver install uiautomator2, then appium driver doctor uiautomator2 to check required setup.
  7. Start the Appium server. Run appium in a terminal and leave it running while the client script connects.
  8. Install the language client. Install the client library for your chosen language, then create a session, interact with the app, and end the session.

The CLI reference documents server and driver commands: Appium Command Line Interface. Appium pages cited here have different version labels: the introduction is version 2.2, getting-started is 3.0, and UiAutomator2 setup is 3.3. Use the current guide for the version you install rather than treating every page as documentation for one identical release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run a first test in Python

This example follows Appium’s official Python quickstart: install the client, set Android capabilities, connect to the local server, find the “Apps” item in Android Settings, click it, and quit the session. Run it with an emulator or device already available, Appium running, and the UiAutomator2 driver installed. The official sample is at Write a Test (Python).

  1. Install the client package: pip install Appium-Python-Client.
  2. Save the following as first_test.py and run python first_test.py.
from appium import webdriver
from appium.options.android import UiAutomator2Options
from appium.webdriver.common.appiumby import AppiumBy

options = UiAutomator2Options()
options.platform_name = "Android"
options.automation_name = "UiAutomator2"

# The quickstart sample uses Android Settings as its test app.
options.app_package = "io.appium.android.apis"
options.app_activity = ".view.WebView1"

# The Appium server must be running and reachable at this address.
driver = webdriver.Remote("http://127.0.0.1:4723", options=options)
try:
    apps = driver.find_element(AppiumBy.ACCESSIBILITY_ID, "Apps")
    apps.click()
finally:
    driver.quit()

The example demonstrates the sequence, not a claim that it has been independently tested here. The server URL must point to the machine and port where your server is listening; if the client runs elsewhere, replace the loopback host with a reachable server address. The app package and activity identify the sample target used by the official guide, so a test for your own app must use the identifiers and launch details for that app.

How the pieces fit in a real test

  • Test runner: starts the test and evaluates assertions; choose one for your language.
  • Client library: turns your calls into WebDriver requests.
  • Appium server: accepts HTTP requests and manages the session.
  • Platform driver: translates commands into the target platform’s automation stack.
  • Target: the app running on an emulator, simulator, or physical device.

These pieces can be on different machines as long as the client can reach the server and the server can access the driver and target. A remote or cloud-hosted setup changes where the server and device run; it does not remove the need to confirm the selected driver supports the target and test mode.

Common setup failures and how to diagnose them

  • adb devices shows no target: start the emulator or check the device connection and USB debugging configuration. Do not troubleshoot Appium sessions until ADB sees the intended target.
  • The driver is missing: Appium drivers are separate modules. Install UiAutomator2 with appium driver install uiautomator2, then rerun appium driver doctor uiautomator2.
  • The doctor reports missing prerequisites: check the Android SDK and Platform-Tools installation, ANDROID_HOME, Java JDK, and JAVA_HOME against the setup guide. Correct the reported environment issue before retrying.
  • The client cannot connect: ensure the server process is running, the URL and port match, and network access exists between client and server. A loopback address such as 127.0.0.1 only reaches the same machine.
  • The session starts but an element is not found: confirm the app launched and that the locator matches an element in the current screen. The sample locator refers to the Apps item in Android Settings, not an arbitrary app.
  • A command behaves differently across platforms: check the selected driver documentation and its supported commands. Appium’s common API does not make each platform’s capabilities identical.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

Appium automates mobile app interfaces; if your task is instead to capture a web page as an image or PDF, ScreenshotNeo offers a one-request screenshot API. This is a separate web-capture tool, not an Appium driver. For a PNG, JPEG, or WebP image, the API accepts one GET request with a URL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for parameters. It can accept cookie banners and remove known consent platforms, newsletter popups, and chat widgets before capture; those steps can be disabled. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up free for 1,000 screenshots a month, with no card required.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.