Appium interview questions and answers for mobile test automation
Appium interview questions test whether you can automate real mobile apps, not just browsers: how the Appium server hands WebDriver commands to a platform driver such as UiAutomator2 or XCUITest, which capabilities start a session, which locators stay fast and stable on Android and iOS, and how to handle gestures, permission pop-ups and WebView contexts. Senior rounds focus on flaky tests, parallel device runs and framework design across two platforms. Answers that mention real device problems, such as signing, keyboards and slow emulators, stand out.
By Evin JohnPublished 8 min read
Where Appium questions come up
Appium is a widely used open-source automation tool for native, hybrid and mobile web apps, so it appears in mobile QA engineer, SDET and test-automation interviews. Many candidates arrive from browser testing, and interviewers probe exactly what changes on a phone: no stable DOM in native apps, two platforms with different element trees, slower and less predictable devices, and app installs, permissions and keyboards to manage. If the role also covers web, expect browser WebDriver questions from Selenium interview questions in the same loop.
- ConceptsArchitecture, drivers, capabilities and locator strategies, often as a quick-fire screen.
- Framework walk-throughExplain the structure of a mobile framework you built: page objects, configuration per platform, reporting and CI.
- Write or fix a testLog in, scroll to an item, handle a permission dialog, assert a result, without fixed sleeps.
- Flakiness and scaleWhy a suite fails only on CI, how to run on many devices in parallel, and when to use a cloud device farm.
Appium fundamentals questions
| Question | What it tests | What a strong answer shows |
|---|---|---|
| How does Appium work end to end? | Architecture | A client library sends W3C WebDriver commands over HTTP to the Appium server (a Node.js process). The server routes them to a driver for the platform, which uses the device's own framework: UiAutomator2 or Espresso on Android, XCUITest on iOS. |
| What changed with Appium 2? | Versions | Drivers and plugins became separate packages you install with the appium command line, the default base path dropped /wd/hub, and capabilities beyond the standard ones use the appium: prefix. Details vary by driver version, so check the docs for yours. |
| What are desired capabilities? | Sessions | The key-value settings that start a session: platformName, appium:automationName, appium:app or appBundleId and appPackage, appium:udid or a device name, plus behavior flags such as noReset. |
| Native, hybrid and mobile web apps? | App types | Native apps use platform UI components. Hybrid apps wrap web content in a WebView inside a native shell. Mobile web runs in the phone's browser. Each needs a different locator approach and sometimes a context switch. |
| Emulator, simulator or real device? | Environments | Android emulators and iOS simulators are fast to provision and good for most functional checks. Real devices catch performance, camera, biometrics, push notifications and manufacturer quirks. iOS automation needs a Mac with Xcode. |
| What is Appium Inspector for? | Tooling | Inspecting the element tree of a running session, trying locators and recording element attributes. It is a helper for writing tests, not a test runner. |
| UiAutomator2 or Espresso driver? | Android drivers | UiAutomator2 works as a black box on any app and can reach system UI. Espresso runs inside the app process, which can be faster and more synchronized, but needs a debug build arrangement. |
| What do noReset and fullReset do? | App state | noReset keeps app data between sessions to save time; fullReset uninstalls and reinstalls for a clean slate. Most suites reset state through the app or an API, not a full reinstall. |
| How do implicit and explicit waits differ on mobile? | Synchronization | Implicit waits apply to every find and hide slow screens. Explicit waits target one condition, such as an element becoming clickable. Mixing both makes timings unpredictable. |
| How do you install an app under test? | Setup | Point appium:app at an APK or an iOS app or IPA build, or install it ahead of time and start it by package or bundle ID. |
Locators and gestures questions
- Which locator would you try first? The accessibility ID, because it is shared across platforms when developers set it and survives layout changes. Then resource-id on Android or name on iOS. Ask developers to add IDs; it is cheaper than clever XPath.
- Why is XPath slow in Appium? The driver has to serialize the whole native view hierarchy to XML and search it, on every call. Deep trees on iOS make this especially slow.
- What are the platform-specific locator strategies? On Android, UiAutomator selectors (for example
new UiSelector().text("Pay")or a UiScrollable to scroll into view). On iOS, predicate strings and class chains, which are evaluated natively and are much faster than XPath. - How do you perform a swipe or a long press? With W3C Actions: a pointer of type touch, pointer down, a pause, a move, pointer up. Older TouchAction classes are deprecated in current clients. Drivers also offer
mobile:extension commands for common gestures. - How do you scroll to an element that is not on screen? A platform scroll (UiScrollable or a mobile scroll command) until the element appears, with a limit on attempts. Coordinates should be relative to screen size, never fixed pixels.
- How do you handle the soft keyboard? Hide it when it covers the next element, or send input to the field without tapping each key. Keyboards differ by device, which is a common source of flaky taps.
- How do you deal with permission dialogs? Grant permissions in capabilities where the driver supports it (Android), accept system alerts automatically where available on iOS, or handle the dialog explicitly in a helper when the test is about the permission itself.
Contexts, sessions and parallel runs
def build_caps(devices, app_android, app_ios, base_port=8200):
caps = []
for i, d in enumerate(devices):
c = {"platformName": d["platform"], "appium:udid": d["udid"], "appium:newCommandTimeout": 120}
if d["platform"] == "Android":
c.update({"appium:automationName": "UiAutomator2", "appium:app": app_android,
"appium:systemPort": base_port + i})
else:
c.update({"appium:automationName": "XCUITest", "appium:app": app_ios,
"appium:wdaLocalPort": base_port + 100 + i})
caps.append(c)
return caps
devices = [
{"platform": "Android", "udid": "emulator-5554"},
{"platform": "Android", "udid": "emulator-5556"},
{"platform": "iOS", "udid": "SIM-A1"},
]
caps = build_caps(devices, "/builds/shop.apk", "/builds/shop.app")
ports = [c.get("appium:systemPort") or c.get("appium:wdaLocalPort") for c in caps]
assert len(set(ports)) == len(ports), "port clash"
assert all(k == "platformName" or k.startswith("appium:") for c in caps for k in c)
for c in caps:
print(c["appium:udid"], c["appium:automationName"], ports[caps.index(c)])
# emulator-5554 UiAutomator2 8200
# emulator-5556 UiAutomator2 8201
# SIM-A1 XCUITest 8302from appium import webdriver
from appium.options.android import UiAutomator2Options
from appium.webdriver.common.appiumby import AppiumBy
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
options = UiAutomator2Options().load_capabilities(caps[0])
driver = webdriver.Remote("http://127.0.0.1:4723", options=options)
try:
wait = WebDriverWait(driver, 15)
wait.until(EC.element_to_be_clickable((AppiumBy.ACCESSIBILITY_ID, "email"))).send_keys("qa@example.com")
driver.find_element(AppiumBy.ACCESSIBILITY_ID, "password").send_keys("not-a-real-secret")
driver.find_element(AppiumBy.ACCESSIBILITY_ID, "sign-in").click()
wait.until(EC.visibility_of_element_located((AppiumBy.ACCESSIBILITY_ID, "home-title")))
finally:
driver.quit()| Question | What it tests | What a strong answer shows |
|---|---|---|
| How do you test inside a WebView? | Hybrid apps | List contexts, switch from NATIVE_APP to the WEBVIEW context, then use web locators. On Android this relies on a matching Chromedriver and a debuggable WebView; switch back for native controls. |
| How do you run tests on ten devices at once? | Parallelism | One session per device, each with its own UDID and its own driver ports, either on one Appium server or several. Test data must not collide, so each run gets its own accounts. |
| Why does a test pass locally and fail on CI emulators? | Environment | Slower CPU without hardware acceleration, animations left on, different screen size or locale, cold boot timing. Disable animations, wait on conditions, and pin emulator images. |
| How do you start the app on a specific screen? | Speed | Open a deep link, or seed state through an API, instead of tapping through onboarding in every test. |
| What is WebDriverAgent? | iOS internals | The helper app the XCUITest driver installs on the device to execute commands. On real iPhones it must be signed with a valid development team, which is the most common setup problem. |
| Device farm or in-house lab? | Strategy | Cloud farms give breadth of models without hardware upkeep but add network latency and queue time. A small in-house lab suits fast feedback on the main devices. |
Senior Appium and framework design questions
- How would you design one framework for Android and iOS? Shared test flows written against screen interfaces, with a page object per platform that implements them. Locators live in the platform classes, and configuration picks the platform at run time.
- A suite of three hundred tests takes four hours. What do you do? Measure where time goes: reinstalls, onboarding, XPath lookups, fixed sleeps. Then seed state via APIs, replace XPath, run in parallel across devices, and move pure logic checks down to unit or API tests.
- What do you automate on mobile and what not? Automate stable, high-value journeys such as sign-in, search and checkout. Leave rare visual checks, camera hardware and exploratory work to manual testing or specialized tools.
- How do you test push notifications or SMS codes? Avoid depending on real delivery in automated runs; use a test backend that exposes the code, or trigger the notification through a test API and open the notification shade where the driver allows it.
- How do you report a mobile test failure usefully? Screenshot, page source at the failure, device logs (logcat or the iOS system log), the device model and OS, and a video when the platform supports screen recording.
- How do you choose which devices and OS versions to cover? Start from the app's own analytics: the handful of models and OS versions most users have, plus the oldest supported version and one small screen. Run the full suite on a core set and a smoke subset on the long tail.
- How do you run Appium suites in CI? Start emulators or reserve farm devices in a setup stage, start the Appium server with logs saved as artifacts, run tests in parallel shards, and always quit sessions and shut emulators down in a final stage so the next build starts clean.
- How do you keep flaky tests from eroding trust? Track flake rate per test, quarantine repeat offenders with an owner and a deadline, and fix root causes rather than adding retries everywhere.
Fictional example
- Interviewer
- Your checkout test passes every time on Android and fails roughly one run in five on the iOS simulator at the pay button. How do you approach it?
- Candidate
- First I would collect evidence from failed runs: the screenshot, the page source and the simulator log, to see whether the button is missing, covered or not yet enabled. On iOS my first suspects are the keyboard covering the button after the card field, an animation still running, and an XPath that matches a different element in some layouts. I would replace any fixed sleep with a wait for the button to be enabled and visible, dismiss the keyboard explicitly, and switch to the accessibility ID if the developers have set one, asking them to add it if not. Then I would run the test many times in a loop on CI to confirm the rate dropped, rather than trusting one green run.
Appium practice plan
- Days 1 and 2: install Appium and one driver, start an Android emulator, open a sample app in Appium Inspector and write a sign-in test with accessibility IDs and explicit waits.
- Day 3: add a swipe with W3C Actions, a scroll to an off-screen element and a permission dialog helper.
- Day 4: test a hybrid screen by switching to the WebView context and back.
- Day 5: run two emulators in parallel with unique ports and separate test accounts.
- Days 6 and 7: prepare a two-minute walkthrough of your framework, and one flaky test story with the cause and the fix.
Mobile QA loops often include general automation questions; see automation testing interview questions. Hybrid apps built on AngularJS are covered from the developer side in AngularJS interview questions, and if you run emulators on cloud machines, AWS EC2 interview questions explains instance choices and why hardware acceleration matters there.
Flaky-test stories land best when the order of evidence is clear. Natively, an AI interview assistant for Mac and Windows, transcribes a mock SDET round on your machine, so you can read back whether you gathered logs before proposing a fix. While practicing, it can read a failing test or an Appium error from a screenshot and suggest angles to cover, and with Pro or the free trial it can use the résumé and job description you add. The transcript and notes stay saved for later review.
Questions people ask
What Appium questions are asked in interviews?
How the Appium server, drivers and client libraries fit together, capabilities, locator strategies for Android and iOS, gestures, switching to WebView contexts, real devices versus emulators, parallel runs and fixing flaky mobile tests.
What is the difference between Appium and Selenium?
Both speak the WebDriver protocol. Selenium automates browsers through browser drivers, while Appium automates native, hybrid and mobile web apps through platform drivers such as UiAutomator2 and XCUITest.
Which locator is best in Appium?
Accessibility IDs where developers set them, then resource IDs on Android or names on iOS. Platform strategies such as iOS predicate strings are faster than XPath, which is slow on mobile.
How do I prepare for an Appium interview?
Automate a sample app on an emulator with explicit waits, add a gesture, a permission dialog and a WebView switch, run two devices in parallel, and prepare one flaky-test story with its root cause.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
