skip to content

Appium

Cross-platform UI automation driving native, hybrid, and mobile-web apps over the WebDriver protocol, so one suite can target both iOS and Android. Interviewers ask about locator strategies and flakiness, because that is where mobile end-to-end suites usually die.

on this pageshow

explore

questions

230 · 7 sections

In Appium 3, what must a POST /session request body contain to start a session?

level: juniorimportance: must knowfreq 74%
basics
~10 s

Appium 3 accepts a single top-level capabilities object holding alwaysMatch and firstMatch. The older desiredCapabilities and requiredCapabilities bodies are no longer accepted, and every Appium-specific key inside carries the appium: prefix.

open as a page

In Appium, what is WebDriverAgent and why does an XCUITest session need it?

level: juniorimportance: must knowfreq 70%
basics
~20 s

WebDriverAgent is the on-device XCTest runner that Appium's XCUITest driver builds, signs, installs and launches. It holds Apple's automation APIs, so the driver never touches the app itself — it forwards every command to that agent over HTTP.

open as a page

In Appium, what does a session add on top of the W3C WebDriver protocol?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Appium speaks W3C WebDriver unchanged and adds four things: the appium: capability prefix, per-driver mobile: and flutter: execute methods, its own web-view context routes, and, in Appium 3, the deletion of many old /appium/ routes.

open as a page

Why does a freshly installed Appium server automate nothing until you install a driver?

level: middleimportance: must knowfreq 72%
basics
~20 s

Appium 2 turned drivers into separately installed extensions, so the server package ships only the protocol layer and the extension machinery. Until you install a driver - UiAutomator2 for Android, XCUITest for Apple platforms - no session can start.

open as a page

In Appium, what does the official Flutter driver attach to in order to drive a Flutter app?

level: middleimportance: must knowfreq 50%
basics
~10 s

Appium's official appium-flutter-driver attaches over a WebSocket to the Dart VM Service that a running Flutter build publishes, and drives widgets through the ext.flutter.driver service extension registered by Flutter's test package.

open as a page

In Appium, what does appium:deviceName select on Android compared with iOS?

level: juniorimportance: must knowfreq 68%
basics
~10 s

On iOS, appium:deviceName together with appium:platformVersion picks a simulator by model and runtime. On Android the drivers accept the key but never select with it; appium:udid or appium:avd chooses the target there.

open as a page

In Appium, which capabilities choose the driver and which choose the device under test?

level: juniorimportance: must knowfreq 76%
basics
~10 s

Two capabilities choose the driver: platformName and appium:automationName. Different keys choose the machine, and they differ by platform: appium:udid or appium:avd on Android, appium:deviceName with appium:platformVersion for an Apple simulator.

open as a page

In Appium on iOS, which capabilities sign WebDriverAgent for a real device?

level: juniorimportance: must knowfreq 60%
basics
~20 s

Three XCUITest capabilities: appium:xcodeOrgId names the Apple Developer team, appium:xcodeSigningId names the signing identity, and appium:updatedWDABundleId rebuilds the agent under a bundle identifier your provisioning profile covers. Android has no equivalent, because it has no provisioning profile.

open as a page

In Appium, what does the app capability accept, and which identity key does each platform read from it?

level: middleimportance: must knowfreq 72%
basics
~20 s

The app capability takes a local path or http URL to one build artifact: an APK for Android, an IPA or .app bundle for iOS. Each driver reads the app identity from it - the Android package name, the iOS bundle id.

open as a page

In Appium, what happens when a session request sends a vendor capability with no appium: prefix?

level: middleimportance: must knowfreq 71%
basics
~20 s

The Appium server refuses the session and answers with an invalid argument error naming the key. A non-standard capability with no colon namespace is illegal under the W3C protocol, so it is rejected rather than quietly ignored.

open as a page

In Appium, which app-side field does an `accessibility id` locator match on Android, and which on iOS?

level: juniorimportance: must knowfreq 72%
basics
~20 s

On Android the accessibility id strategy matches an element's content-desc. On iOS the XCUITest driver resolves it through the name attribute, which is the element's accessibilityIdentifier or, when that is empty, its visible localised label.

open as a page

In an Appium `-ios class chain`, what do the `/` and `**/` steps mean?

level: juniorimportance: must knowfreq 58%
basics
~10 s

In Appium's iOS class chain strategy, a single slash requires the next element type to be a direct child of the previous match, while a double-star slash lets it sit at any depth below.

open as a page

In Appium, what does the `id` locator strategy match on Android, and what on iOS?

level: juniorimportance: must knowfreq 76%
basics
~20 s

On Android the id strategy matches an element's resource-id, the package-qualified identifier fixed in the build. On iOS it is an alias for the name attribute, which XCUITest fills from the accessibility identifier. Same keyword, two unrelated attributes.

open as a page

In a React Native app under Appium, what does the `testID` prop set on iOS and on Android?

level: juniorimportance: must knowfreq 63%
basics
~20 s

A React Native testID sets the iOS accessibilityIdentifier, which the XCUITest driver exposes behind the name attribute, and on Android it surfaces as the view's resource-id in the page source. Android's content-desc is filled by accessibilityLabel instead.

open as a page

In Appium, what does the `-android uiautomator` locator strategy send to the device, and who evaluates it?

level: juniorimportance: must knowfreq 62%
basics
~20 s

It sends a UiSelector expression as a plain string of chained Java-style calls. Appium's Android UiAutomator2 driver passes it to its on-device server, which parses the text and lets Google's UiAutomator framework match the live view hierarchy.

open as a page

In Appium, what does a POST /session/:sessionId/actions body contain to tap one point?

level: juniorimportance: must knowfreq 74%
basics
~20 s

One pointer input source, and inside it the ticks that model the finger. The source declares an id and a pointer type of touch; the ticks are a move to the coordinate, a press and a lift.

open as a page

In Appium, which command scrolls an off-screen row into view on Android, and which on iOS?

level: juniorimportance: must knowfreq 72%
basics
~10 s

On Android the UiAutomator2 driver scrolls while it searches: an -android uiautomator selector running UiScrollable scrollIntoView, or mobile: scroll. On iOS, XCUITest scrolls to an element you have already found, with mobile: scrollToElement.

open as a page

In Appium 3, what replaced the touch/perform endpoints, and is TouchAction gone?

level: middleimportance: must knowfreq 66%
basics
~20 s

The W3C Actions API replaced them: gestures now go to the actions endpoint. TouchAction is not gone from the clients — java-client still ships it marked deprecated — but the Appium 3 server no longer routes the old touch paths.

open as a page

In Appium, which request types text into a native field on Android and on iOS?

level: middleimportance: must knowfreq 74%
basics
~20 s

Both platforms answer POST /session/:sessionId/element/:elementId/value with a text field. On Android the UiAutomator2 agent performs the typing; on iOS WebDriverAgent does, at a rate the maxTypingFrequency setting bounds. Each driver adds its own typing methods.

open as a page

In Appium, why does a pointerDown then pointerUp action chain tap instead of long-pressing?

level: seniorimportance: must knowfreq 58%
basics
~20 s

Nothing in the chain holds the finger down. A pointer sequence advances one tick at a time, so a press is followed immediately by the lift. Insert a pause tick carrying the dwell between them.

open as a page

In Appium, which command accepts a system alert on Android, and which one on iOS?

level: juniorimportance: must knowfreq 66%
basics
~10 s

On Android the UiAutomator2 driver exposes mobile: acceptAlert and mobile: dismissAlert; on iOS the XCUITest driver exposes mobile: alert, and only iOS also has the appium:autoAcceptAlerts capability that handles alerts without a call.

open as a page

In Appium, which browser does a `browserName` session drive on Android, and which on iOS?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Sending browserName instead of an application makes the phone's own browser the app under test: Chrome on Android, whose page commands a Chromedriver answers, and Safari on iOS, driven by XCUITest through Apple's remote web inspector.

open as a page

In Appium, how is a web-view context handle named on Android compared with iOS?

level: juniorimportance: must knowfreq 66%
basics
~20 s

Both platforms share the WEBVIEW_ prefix and then diverge: Android appends the package name of the process hosting the web view, while iOS appends a numeric page id that the remote debugger assigns at runtime.

open as a page

In Appium, which commands foreground, background and terminate the app under test on Android and Apple platforms?

level: juniorimportance: must knowfreq 74%
basics
~20 s

Both sides share mobile: activateApp to foreground an app, mobile: backgroundApp to suspend it, mobile: terminateApp to stop it and mobile: queryAppState to check it. Android adds mobile: startActivity; Apple platforms add mobile: launchApp and mobile: killApp.

open as a page

In Appium on Android, what does the appium:autoGrantPermissions capability do?

level: juniorimportance: must knowfreq 64%
basics
~20 s

It tells the Android drivers to grant every permission the app declares as part of installing it, so no runtime prompt ever appears. It is an install-time switch decided at session start, and the XCUITest driver has no equivalent.

open as a page

In Appium, which request captures a still screenshot on Android and on iOS?

level: juniorimportance: must knowfreq 74%
basics
~10 s

Both platforms answer the same W3C request, GET /session/:sessionId/screenshot, and return the whole screen as a base64-encoded PNG. Appium's UiAutomator2 driver on Android and its XCUITest driver on Apple platforms behave identically here.

open as a page

In Appium, what must be enabled on a real Android phone and on a real iPhone before a session starts?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Android needs developer options with USB debugging on and the host authorised, so the phone lists as online. Apple hardware needs Developer Mode enabled, the host trusted, and a signed WebDriverAgent the operating system will launch.

open as a page

In Appium, what changes when the server URL is remote instead of localhost?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Only the endpoint changes: scheme, host, port and any base path. The Android and iOS capability sets travel unchanged — capabilities describe a device and a build, never a server. The catch: path-valued capabilities resolve on the server's filesystem.

open as a page

In Appium, how does a session get onto an Android emulator versus an Apple simulator?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Two different toolchains. On Android the drivers launch or attach to a named AVD and reach it over adb like any other Android target. On Apple the XCUITest driver boots a simulator with simctl, which requires a macOS host with Xcode.

open as a page

In Appium, when does an appium:language or appium:locale change take effect on Android and iOS?

level: middleimportance: must knowfreq 52%
basics
~20 s

Both are session-start capabilities, so on Android and on Apple real devices a language or locale change needs a new session. Apple simulators are the exception: XCUITest's mobile: configureLocalization changes localization inside a live session.

open as a page

In Appium, which flake sources does a mobile run have that a browser run cannot?

level: juniorimportance: must knowfreq 64%
basics
~20 s

Mobile adds five failure sources a browser page cannot have: system animation moving the target, the soft keyboard drawn over it, an OS-owned prompt above the app, a slow emulator or simulator, and an element tree that is already stale.

open as a page

In Appium, how do you take system animation out of a greenhouse climate run on Android and iOS?

level: middleimportance: must knowfreq 52%
basics
~20 s

Turn the motion off at the device. On Android the appium:disableWindowAnimation capability drops the system animation scales for the session; on Apple platforms the XCUITest driver's reduceMotion setting asks the OS to prefer non-motion transitions.

open as a page

Appium Inspector's attach-to-session list is empty though a locksmith call-out session is running — why?

level: middleimportance: must knowfreq 47%
basics
~10 s

The Inspector builds that list from GET /appium/sessions, which Appium gates behind the session_discovery insecure feature. Start the server with allow-insecure set to the scoped name *:session_discovery, or the list stays empty.

open as a page

Why can Appium Inspector show a locksmith call-out element that your test's find call cannot match?

level: middleimportance: must knowfreq 58%
basics
~20 s

The Inspector's tree is a page-source snapshot from your last refresh, not a live view, and it is depth-capped by snapshotMaxDepth. Your test's find runs against its own fresh capture, so the two can honestly disagree.

open as a page

In Appium, which request pulls a device log, and which log types exist on Android versus iOS?

level: middleimportance: must knowfreq 58%
basics
~20 s

Appium pulls device logs with POST /session/:sessionId/se/log, naming a type in the body. The Android drivers offer logcat and bugreport; the XCUITest driver offers syslog, crashlog and safariConsole. GET /session/:sessionId/se/log/types lists what a driver serves.

open as a page