skip to content

Capability Sets

The key-value set a client sends to open an Appium session, fixing the driver, the target device, the app and the session's own behaviour before the first command is ever sent.

on this pageshow

explore

questions

25

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

level: juniorimportance: must knowfreq 68%

answer

  1. friendly key, unfriendly behaviour
  2. not a core capability at all
  3. one platform selects, the other only logs
  4. Android selects by udid or avd

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.

solid answer

~40 s

`appium:deviceName` is not a core Appium capability — the core constraint list does not carry it. It is declared by the Android drivers and, separately, by the XCUITest driver, and the two do different things with it. On an Apple simulator it genuinely selects: it names the model, and `appium:platformVersion` names the runtime, so the pair narrows a Mac's several installed simulators to one. On Android it is accepted, logged, and never read for selection — the target is chosen by `appium:udid` (an attached handset or a running emulator, by the serial adb reports) or by `appium:avd` (an emulator by AVD name). An Android request carrying only `appium:deviceName` has stated a preference nothing acts on, and it fails silently.

go deeper

for a junior

Be ready to say plainly that appium:deviceName selects a simulator on Apple platforms, alongside appium:platformVersion, and selects nothing on Android, where appium:udid and appium:avd do that job.

for a middle

Explain the mechanics: the key is declared per driver rather than by the core, the XCUITest driver maps it onto how simctl identifies a simulator, and the Android drivers simply never read it for selection.

for a senior

Show how you catch a silent mis-selection in a real suite: what the green-but-wrong run looks like, why the report agrees with the mistake, and what you change so every run names its own machine.

for a principal

Own the guardrail rather than the fix — how a capability map is reviewed or validated before a fleet runs on it, so a key that is accepted but never acted on cannot quietly define your evidence.

`appium:deviceName` is the friendliest-looking key in an Appium session request and the one most likely to do nothing. Whether it selects anything at all depends on the platform, and that divergence is the content of this topic rather than a footnote to it. ## It is not a core capability Appium's own constraint list — the capabilities the base driver accepts for every session — does not carry `appium:deviceName`. The key is declared by the Android drivers and, separately, by the XCUITest driver. Two drivers declaring the same name is not the same as two drivers doing the same thing with it, and here they do not. That is worth holding onto, because it explains why nothing in the core enforces a single meaning for the key. ## On an Apple simulator it genuinely selects For a simulator, `appium:deviceName` is how you name the target. It carries the model name, and it works with `appium:platformVersion`, which carries the runtime. Both are load-bearing: a Mac usually has the same model installed against several runtimes, so a model name on its own is ambiguous, and the pair is what narrows it to one. The XCUITest driver reaches simulators through `simctl`, where a simulator really is identified by a name and a runtime, so the capability maps onto something the platform already has. For a real Apple device the answer changes again — there the request names the target with `appium:udid`. ## On Android it selects nothing The Android drivers declare `appium:deviceName`, so the server accepts it. Nothing warns. It rides along with the session and appears wherever the capability map is printed. What it does not do is choose which attached handset or which emulator the session drives. That job belongs to two other keys: - `appium:udid` — names a target by the serial adb reports for it, which covers a real handset and a running emulator alike. - `appium:avd` — names an Android Virtual Device by its AVD name. An Android request that carries `appium:deviceName` and neither of those has expressed a preference the driver never reads. ## Side by side | | Android | Apple simulator | Apple real device | | --- | --- | --- | --- | | does `appium:deviceName` select? | no | yes | no | | what selects instead | `appium:udid` or `appium:avd` | it is the selector | `appium:udid` | | companion key required | none | `appium:platformVersion` | none | ## Why it bites a dental-recall suite Picture the dental-recall booking app with two lanes and one shared capability template. The Apple lane was written first, so the template carries `appium:deviceName`. Someone adds the Android lane by copying it, changing `platformName` and `appium:automationName`, and setting `appium:deviceName` to the name of the reception tablet in the lab rack. Every run afterwards is green. Then the recall-reminder screen starts failing intermittently. The report says the run was on the reception tablet, so the investigation goes to that tablet and finds nothing. The Android requests never named a target the driver acts on, so the sessions were not necessarily on that tablet at all, and the failure turns out to be a layout problem on a screen size nobody believed was in the run. That is the shape of the whole failure class: 1. The session starts normally, so there is no error message to search for. 2. The capability map looks complete and reads sensibly to a human. 3. The report quotes the request, so the report agrees with the wrong belief. 4. The symptom surfaces as flakiness, or as a device-specific bug nobody can reproduce on the device they think ran it. ## What to write instead - On Android, name the target with `appium:udid` or `appium:avd`, and treat `appium:deviceName` as a comment. - On an Apple simulator, always send `appium:deviceName` and `appium:platformVersion` together. - On a real Apple device, use `appium:udid`. - Wherever a report or dashboard says device, make sure it prints the key that selected on that platform, not the friendliest key in the map. The rule that survives all of it: a capability is accepted by the server and acted on by the driver, and those are two different tests. `appium:deviceName` passes the first on both platforms and the second on only one.

  • If Android ignores it for selection, why does the key exist there at all?
    The Android drivers declare it, so the server accepts it and it travels with the session — readable in logs and in whatever a report copies out of the capability map. What it is not is an input to target selection, which is `appium:udid` and `appium:avd` alone. Accepted and acted on are different things.
  • Two Apple simulators of the same model are installed against different runtimes. What does a request with only appium:deviceName get?
    An under-specified request. The model name matches more than one installed simulator, so `appium:platformVersion` is what narrows it to the runtime you meant. Naming the model alone leaves the choice to something other than your request, and a dental-recall run can end up on a runtime it never named.

It is the name on an office door. In one building reception really does route visitors by that name; in the other the sign is decoration and only the badge number opens anything.

saying these in an interview costs you the question

  • Thinks appium:deviceName picks the Android handset a session drives
  • Expects an error when Android ignores appium:deviceName
  • Names an Apple simulator by model alone, with no platformVersion
  • Treats appium:deviceName as a core Appium capability
  • Reads appium:deviceName in an Android report as proof of the device
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, what does a default reset do to the app on Android, and what on iOS?

level: middleimportance: must knowfreq 64%

basics

~20 s

With appium:noReset and appium:fullReset both false, the Android drivers clear the app's data in place and leave it installed, while the iOS driver has no in-place clear and gets a clean start only by reinstalling the app.

open as a page

In Appium on Android, what do the appium:noSign and appium:useKeystore capabilities control?

level: middleimportance: must knowfreq 47%

basics

~20 s

Both act on the Android app under test, not on a test agent. By default the drivers can re-sign the build with appium-adb's bundled certificate; appium:noSign skips that step, and appium:useKeystore keeps it but signs with your own keystore instead.

open as a page

An Appium session drives yesterday's build though the app capability names a new artifact. Why?

level: seniorimportance: must knowfreq 55%

basics

~20 s

Because the install is conditional. Both the Android drivers and the XCUITest driver compare the artifact against the build already installed under the same identity and skip the install when they judge it unnecessary. appium:enforceAppInstall forces it.

open as a page

An Appium capability you set for a community-garden plot app is ignored with no error — what explains it?

level: seniorimportance: must knowfreq 52%

basics

~20 s

A key that carries the appium: namespace but that the chosen driver does not know is still a legal extension capability, so the server accepts it and nothing ever reads it. Only an unprefixed non-standard key fails the session outright.

open as a page

Your Appium ferry timetable suite starts every iOS real-device session already signed in, though appium:noReset is false. Why?

level: seniorimportance: must knowfreq 52%

basics

~20 s

Because appium:noReset false only asks the XCUITest driver for its normal clean-up, and on a real device that clean-up is a reinstall. A session that names an already-installed bundle with no build to install clears nothing.

open as a page

How would you set Appium's reset capabilities for a ferry timetable suite running on both Android and iOS?

level: principalimportance: must knowfreq 44%

basics

~20 s

Choose per platform, not once: Android can clear data in place cheaply, so the default reset is affordable there, while an iOS lane either pays for a reinstall every session or makes the suite reset the state itself.

open as a page

In Appium, which capability names may be sent without the appium: prefix?

level: juniorimportance: should knowfreq 64%

basics

~10 s

Only the twelve W3C standard capabilities may travel unprefixed in Appium, among them platformName, browserName, timeouts and webSocketUrl. Every other key, including automationName, app and udid, must be written as an appium: capability.

open as a page

In Appium, what is the difference between the appium:noReset and appium:fullReset capabilities?

level: juniorimportance: should knowfreq 66%

basics

~20 s

appium:noReset tells the driver to skip its between-session clean-up, so the app keeps whatever it stored. appium:fullReset does the opposite and uninstalls the app before the session, so nothing at all survives on either Android or iOS.

open as a page

In Appium, what identifier does appium:udid carry on Android and on Apple platforms?

level: juniorimportance: should knowfreq 58%

basics

~10 s

appium:udid is one core capability spelled the same way on both platforms, but it carries different identifiers: on Android the serial adb reports for a target, on Apple platforms the device UDID.

open as a page

In Appium, what does appium:avd name on Android, and what names an Apple simulator?

level: middleimportance: should knowfreq 50%

basics

~10 s

appium:avd names an Android Virtual Device by its AVD name and exists only on Android. Apple platforms have no counterpart key: a simulator is named by appium:deviceName plus appium:platformVersion.

open as a page

In Appium, which capability bounds the on-device agent's startup on Android, and which on iOS?

level: middleimportance: should knowfreq 55%

basics

~10 s

Android bounds the UiAutomator2 helper server's launch with appium:uiautomator2ServerLaunchTimeout and each adb call with appium:adbExecTimeout. iOS bounds WebDriverAgent's build, install and launch with appium:wdaLaunchTimeout. Neither platform's capability has any effect on the other.

open as a page

Your Appium laundry pickup flow hands off to a separate courier app. How do you get both onto the device on Android and iOS?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Name the app under test with the app capability and the extra builds with appium:otherApps, which takes one path or URL or a JSON array of them. Android takes APK files, iOS takes IPA files or .app bundles.

open as a page

In an Appium dental-recall run, two workers on one host drive the same phone — how do you pin each?

level: seniorimportance: should knowfreq 46%

basics

~10 s

Give every worker a capability map that names its own target with a key that platform actually selects on: appium:udid or appium:avd on Android, appium:udid or appium:deviceName with appium:platformVersion on Apple platforms.

open as a page

In Appium on Android, why does letting the drivers re-sign the build change what a run proves?

level: seniorimportance: should knowfreq 42%

basics

~20 s

The APK the session installs is no longer the one your pipeline produced: the Android drivers re-sign it with appium-adb's bundled certificate when a certificate check fails, so anything keyed to the original signature behaves differently. appium:noSign installs it untouched.

open as a page

Your Appium bakery pre-order lane disables appium:newCommandTimeout to survive long pauses — what does that cost?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Setting appium:newCommandTimeout to 0 turns off the server's idle reaper, so only an explicit session delete releases the device. A crashed or killed client then leaves the UiAutomator2 helper server running on Android, or WebDriverAgent running on iOS.

open as a page

For an Appium suite, when should capabilities ship the artifact rather than name an installed build?

level: principalimportance: should knowfreq 38%

basics

~20 s

Ship the artifact with app when the run must prove which build it exercised. Name the installed build with appium:appPackage on Android or appium:bundleId on iOS when session start time dominates and something else provisions the device.

open as a page

In an Appium real-device iOS lane, how do you weigh the upkeep of agent signing?

level: principalimportance: should knowfreq 36%

basics

~20 s

Treat it as standing cost, not setup. Every real Apple device the lane touches must sit under a team profile, the agent is signed on a macOS host with Xcode, and identities expire. Android carries no equivalent gate.

open as a page

How should an Appium bakery pre-order fleet budget startup timeouts across Android and Apple lanes?

level: principalimportance: should knowfreq 30%

basics

~20 s

Budget per platform, never once. Android's ceilings cover starting a helper server over adb; Apple's covers building and launching WebDriverAgent. Set each from a measured cold worst case, and treat a ceiling you keep raising as a signal to fix startup itself.

open as a page

In Appium, which unit does appium:newCommandTimeout use, and which do the startup timeouts use?

level: juniorimportance: nice to knowfreq 42%

basics

~20 s

newCommandTimeout is the one Appium timeout counted in seconds. The agent startup capabilities are counted in milliseconds: uiautomator2ServerLaunchTimeout and adbExecTimeout on Android, wdaLaunchTimeout on iOS. Mixing the two units is an error of a thousand.

open as a page

In Appium, what does nesting keys inside appium:options change about their names?

level: middleimportance: nice to knowfreq 41%

basics

~20 s

Keys nested inside appium:options are written without the appium: prefix, and the server promotes each one to its prefixed top-level form before the driver reads it. One namespaced key then carries the whole Appium-specific block.

open as a page