QA Interview Hub · Knowledge base · Quizzes · Українська

All topics

Appium interview questions and answers for QA

14 Appium questions that come up in QA interviews, with short answers. Open the topic in the knowledge base for a deeper explanation.

How is Appium built?

A client–server architecture on the W3C WebDriver protocol. A test with a client library (java-client) sends HTTP/JSON requests to the Appium server (Node.js, port 4723), the server passes them to the platform driver, which controls the device through a helper agent (UiAutomator2 server on Android, WebDriverAgent on iOS). The app does not need to change: it is a black box.

Read the topic

Which drivers are used for Android and iOS?

Android: UiAutomator2 (appium:automationName = UiAutomator2), for Android 8.0+ (since driver 6.0); there is also Espresso. iOS: XCUITest (automationName = XCUITest) built on WebDriverAgent; it needs macOS and Xcode. The driver is chosen by the pair platformName + appium:automationName.

Read the topic

What changed in Appium 2 about drivers and plugins?

The server ships without drivers: they are installed separately — appium driver install uiautomator2 or xcuitest (list: appium driver list --installed). The same goes for plugins: appium plugin install, enabled with --use-plugins. The server base path is no longer /wd/hub but /, so the URL is http://127.0.0.1:4723.

Read the topic

Which capabilities define an Appium session and why the appium: prefix?

At minimum: platformName, appium:automationName (the driver), appium:app (the build) or a browser, appium:deviceName / appium:udid (the device). Under W3C only standard fields (platformName, browserName) go unprefixed, the rest carry the appium: vendor prefix. In Java it is added by UiAutomator2Options and XCUITestOptions. The session is ended by driver.quit(), otherwise it lives until newCommandTimeout (60 s).

Read the topic

Which locator strategies does Appium have and which to choose first?

AppiumBy.accessibilityId (content-desc on Android, accessibilityIdentifier on iOS) is the best: stable, fast, shared across platforms. Then id (resource-id on Android), native androidUIAutomator (UiSelector), iOSNsPredicateString and iOSClassChain, and XPath last. MobileBy was removed in java-client 9.0, use AppiumBy.

Read the topic

Why is XPath on mobile the last resort?

The driver dumps the whole screen hierarchy as XML and evaluates the expression over it: that is slow (especially in XCUITest). The locator depends on nesting and element order, so it breaks when the layout changes, and it differs between Android and iOS. Prefer accessibility id, id, UiSelector, predicate or class chain.

Read the topic

What is Appium Inspector?

A separate app (desktop or web) that connects to the Appium server: it starts a session with the given capabilities, shows a screenshot with the element tree and its attributes (accessibility id, resource-id, text), and lets you check a locator before writing code. It does not manage emulators and does not run tests.

Read the topic

Why are explicit waits better than Thread.sleep and implicit waits?

An explicit wait (WebDriverWait + ExpectedConditions, for example visibilityOfElementLocated) waits for a concrete condition and ends as soon as it holds, or fails on timeout with a clear reason. Thread.sleep wastes time or does not cover the slow case. An implicit wait applies to every lookup, and mixing it with an explicit one gives unpredictable total time.

Read the topic

How do native, hybrid and mobile web apps differ for Appium?

Native — written for the platform, elements are exposed to the driver directly; you set appium:app. Hybrid — a native shell with a WebView, so context switching is needed. Mobile web — a site in the device browser: instead of appium:app you set browserName (Chrome, Safari) and open the URL.

Read the topic

What are the NATIVE_APP and WEBVIEW_* contexts and how do you switch between them?

A session starts in NATIVE_APP (mobile locators). WebView content is available in the WEBVIEW_<package> context: driver.getContextHandles() lists them, driver.context("WEBVIEW_…") switches, and driver.context("NATIVE_APP") goes back. Web locators (CSS, XPath) work in a WebView. On Android, WebView debugging must be enabled and chromedriver must be compatible.

Read the topic

How do you perform gestures (swipe, long press) in java-client 9.x?

TouchAction and MultiTouchAction were deprecated in java-client 8 and removed in 11. Use W3C Actions: PointerInput (touch) + Sequence + driver.perform(List.of(sequence)), or ready driver commands through driver.executeScript: mobile: swipeGesture, scrollGesture, clickGesture, longClickGesture (UiAutomator2) and mobile: swipe (XCUITest).

Read the topic

Emulators, simulators, real devices and cloud farms: when to use which?

Android emulators and iOS simulators are cheap and fast, suited to CI and daily runs (iOS simulators only on macOS with Xcode). Real devices are needed for camera, biometrics, push, performance and vendor quirks. Cloud farms (BrowserStack, Sauce Labs) give many models and OS versions without your own fleet: the server URL and vendor options change.

Read the topic

What is needed to run Appium tests in parallel?

One Appium 2 server runs several sessions if they do not share resources: a unique appium:udid per device, appium:systemPort on Android (UiAutomator2, by default the first free port in 8200–8299) and appium:wdaLocalPort on iOS (8100 by default); chromedriverPort too for WebViews. The tests themselves must be independent, with no shared accounts or data.

Read the topic

What are common causes of flaky mobile tests and how do you fix them?

Thread.sleep instead of explicit waits, animations, system dialogs and push, brittle XPath, shared ports and devices, leftover state from a previous test (noReset / fullReset), a slow emulator in CI. Fix them with explicit waits, disabled animations, stable locators (accessibility id), test isolation and clean state, not "rerun until green".

Read the topic

Practice Appium with flashcards