Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

What Is Appium?

Learn what Appium is, how it automates Android and iOS apps through the WebDriver protocol, what you can test with it, and how this course is organized.

Appium is an open-source tool that drives mobile apps the way a person would: it taps buttons, types into fields, swipes lists and reads what is on the screen. You write a test in a normal programming language, Appium turns each line into a command for a phone or emulator, and your test checks that the app reacted correctly.

The big idea is that Appium does not care how the app was built. A native Android app written in Kotlin, an iPhone app written in Swift, a React Native app and a mobile website in a browser can all be automated with the same style of code. This lesson explains what Appium is, what it is made of and what you will learn in this course.

Honest note about this course. Appium needs a server, a phone or emulator and (for iPhones) a Mac. None of that can run inside a web page. So the commands, configuration files and test code you see in plain code blocks are real Appium usage, but they are read-only. The runnable examples in TryIt boxes are clearly labelled stand-ins: small JavaScript programs that model the same ideas (requests, capabilities, locators, waits) so you can experiment right here. We never show output that a real device would produce unless we are certain about it.

What Appium automates

Appium can automate three kinds of mobile apps, which you will meet in detail in the next lesson:

  • Native apps, built with the platform SDK (Android Views or Jetpack Compose, iOS UIKit or SwiftUI).
  • Hybrid apps, which are native shells containing web views.
  • Mobile web, which means websites opened in Chrome on Android or Safari on iOS.

It works on real devices, Android emulators and iOS simulators. Beyond phones, drivers exist for tablets, Windows desktop apps, macOS apps, smart TVs and more, because Appium is really a general automation framework with a mobile focus.

How Appium works in one picture

Appium is built as a client-server system. Your test code (the client) sends HTTP requests to the Appium server. The server hands each request to a driver, and the driver talks to the platform's own automation framework.

flowchart LR
  T["Your test script<br/>(Python, Java, JS, C#...)"] -->|"HTTP + JSON"| S["Appium server"]
  S --> D1["UiAutomator2 driver"]
  S --> D2["XCUITest driver"]
  D1 --> A["Android device<br/>or emulator"]
  D2 --> I["iPhone or<br/>simulator"]

Figure: one server, many drivers, each speaking the native language of its platform.

Because the conversation between client and server is the W3C WebDriver protocol (the same one Selenium uses for browsers), clients exist for nearly every language. You can write tests in Python today and switch to Java next year without changing the server.

The four building blocks

  1. Server. A Node.js program, started with the appium command. It listens on port 4723 by default.
  2. Drivers. Plug-ins that know one platform. uiautomator2 automates Android, xcuitest automates iOS, espresso is an Android alternative, and there are drivers for Flutter, Windows and others. In Appium 2 and later, drivers are installed separately.
  3. Clients. Libraries for your language that wrap the HTTP calls into friendly methods such as find_element and click.
  4. Tools. Companions like Appium Inspector, a desktop app for exploring the screen of a running app.

Appium 2 turned the old monolithic server into this plug-in design, and later releases kept it. If you read an older tutorial that uses the /wd/hub URL and the desired capabilities phrase, it describes Appium 1; this course teaches the modern design.

Why teams choose Appium

  • One tool for both platforms. Much of the test logic can be shared between Android and iOS.
  • No change to the app. Appium tests the same build you ship; you do not recompile with a special test library (unlike some alternatives).
  • Any language. Use what your team already knows.
  • Open source and standards-based. No license fees, and a large community of plug-ins and cloud services built on the same protocol.

It also has costs: tests are slower than unit tests, they depend on devices and the environment, and a badly written suite becomes flaky. Later chapters on waits, page objects and CI are about managing exactly those costs.

A first taste: what a command looks like

Everything Appium does is an HTTP request with a JSON body. Creating a session, which means "start talking to a device", looks like this on the wire (read-only):

JSON
POST http://127.0.0.1:4723/session
{
  "capabilities": {
    "alwaysMatch": {
      "platformName": "Android",
      "appium:automationName": "UiAutomator2",
      "appium:deviceName": "Pixel_8",
      "appium:app": "/builds/shop-debug.apk"
    }
  }
}

Try building that same request yourself with the stand-in below.

JS Stand-in: build a new-session request

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A tiny fake server

To feel the client-server loop, here is a toy server that understands four commands. It is a stand-in, not Appium, but the command names mirror real ones.

JS Stand-in: a toy Appium-style server

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Notice the error object for the missing element. Real Appium also answers with a standard error name (no such element) and a message; your test framework turns it into an exception. You will see the real names throughout the course.

What you will learn

This course has nine chapters. The first four, covered here, take you from zero to confident basics: getting started, architecture and setup, capabilities and sessions, then locators and gestures. The remaining chapters cover Android and iOS specifics, frameworks and page objects, cloud device farms, continuous integration and best practices, and finally projects and practice.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the Appium server do when your test calls a command?

    The server is a router: it accepts WebDriver requests and delegates them to a driver such as UiAutomator2 or XCUITest.
  2. 2. Which statement about Appium and app types is true?

    Appium automates the app from outside, so native, hybrid and mobile web apps are all supported.
  3. 3. Why can you write Appium tests in many languages?

    The protocol is HTTP and JSON, so any language with a client library can talk to the same server.
  4. 4. In Appium 2 and later, how are platform drivers provided?

    Drivers like uiautomator2 and xcuitest are installed on demand with the appium driver install command.

Summary

  • Appium automates mobile apps from the outside using the W3C WebDriver protocol.
  • The architecture is client, server, driver, device; the server is a Node.js program on port 4723.
  • Native, hybrid and mobile web apps are all supported, on real devices and emulators.
  • Drivers are separate plug-ins in Appium 2 and later.
  • Runnable examples in this course are labelled stand-ins because Appium itself cannot run in a browser.

Next: Native, Hybrid and Mobile Web Apps