QA Interview Hub · Knowledge base · Quizzes · Українська
All topics
Appium interview questions
30 questions on Appium, from the basics to the hard ones. Answers and explanations are in the quiz and the knowledge base.
By level: Junior QA interview questions · Middle QA interview questions · Senior QA interview questions
Appium architecture
- What is Appium? Junior
- In Appium 2, how does a Java test on a computer control an app on a device? Junior
- Do you need to modify or recompile an app to test it through Appium? Junior
- Which capabilities select the driver for a native iOS app in Appium 2? Middle
- After npm install -g appium (Appium 2) the session fails with "Could not find a driver for automationName UiAutomator2 and platformName Android". What to do? Junior
- In the session JSON the field looks like appium:deviceName. Why is there a prefix and who adds it in this Java code? Junior
UiAutomator2Options options = new UiAutomator2Options()
.setDeviceName("Pixel_7")
.setApp("/builds/app-debug.apk");
- What are plugins in Appium 2 and how do they differ from drivers? Middle
- The tests never call driver.quit(). What happens to the sessions on the Appium server? Junior
Take the quiz for this chapter · Read the explanation in the knowledge base
Locators and waits
- A native app has the same screens on Android and iOS, and developers are ready to add identifiers. Which locator should you pick first? Junior
- Which native element attributes does AppiumBy.accessibilityId correspond to? Junior
- Which attribute of an Android element does this locator search (UiAutomator2)? Junior
driver.findElement(AppiumBy.id("com.example.shop:id/login_button"));
- Why are XPath locators on mobile (UiAutomator2, XCUITest) considered the last resort? Junior
- What does this line do on Android (UiAutomator2)? Middle
driver.findElement(AppiumBy.androidUIAutomator(
"new UiScrollable(new UiSelector().scrollable(true))"
+ ".scrollIntoView(new UiSelector().text(\"Settings\"))"));
- Which of these locators works only on iOS and runs natively, faster than XPath? Middle
- What is Appium Inspector used for? Junior
- The Home screen loads in 1 to 8 seconds depending on the API. How do you reliably wait for the title? Junior
driver.findElement(AppiumBy.accessibilityId("login")).click();
Thread.sleep(5000);
String title = driver.findElement(AppiumBy.accessibilityId("home_title")).getText();
Take the quiz for this chapter · Read the explanation in the knowledge base
Mobile specifics
- A test opens a site in Chrome on an Android emulator, and there is no .apk. What do you set instead of appium:app? Junior
- A hybrid app opened a WebView and the CSS locator throws NoSuchElementException although the field is visible. What is the most likely cause? Junior
driver.findElement(AppiumBy.accessibilityId("Open site")).click();
driver.findElement(By.cssSelector("#email")).sendKeys("a@b.c");
- getContextHandles() for an Android app returns only [NATIVE_APP] although a WebView is on screen. What to check first? Middle
- The swipe example from an old tutorial does not compile with java-client 11. What replaces it? Middle
new TouchAction<>(driver).press(PointOption.point(500, 1600))
.moveTo(PointOption.point(500, 400)).release().perform();
- On first launch an Android app shows a system camera permission dialog and the test gets stuck. Which UiAutomator2 capability solves this without clicks in the test? Junior
- How do you open the order screen in UiAutomator2 with one call, skipping UI navigation? Middle
driver.executeScript("mobile: deepLink", Map.of(
"url", "shop://orders/42",
"package", "com.example.shop"));
- What does this call do and why is it used in tests? Junior
driver.runAppInBackground(Duration.ofSeconds(5));
Take the quiz for this chapter · Read the explanation in the knowledge base
Running and stability
- A team chooses between Android emulators and real devices. What are real devices still needed for? Junior
- A team wants to run Appium iOS tests on simulators in its own CI. Which requirement cannot be avoided? Junior
- Why does a team use a real device cloud (BrowserStack, Sauce Labs) instead of its own fleet? Junior
- What does appium:noReset = true mean? Junior
- What does this pair of annotations give in a Page Object for two platforms? Middle
public class LoginPage {
@AndroidFindBy(accessibility = "login_button")
@iOSXCUITFindBy(accessibility = "login_button")
private WebElement loginButton;
public LoginPage(AppiumDriver driver) {
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
}
- Two Android UiAutomator2 sessions start in parallel on one Appium 2 server, on two emulators with different udids. The second now and then fails with an error about an occupied systemPort. What to configure? Middle
new UiAutomator2Options().setUdid("emulator-5554").setApp(apk);
new UiAutomator2Options().setUdid("emulator-5556").setApp(apk);
- A test passes locally but in CI on an emulator fails in about every fifth run with NoSuchElementException on a button visible in the screenshot. The locator was verified in Inspector, the build and device are the same. What to check first? Middle
Take the quiz for this chapter · Read the explanation in the knowledge base