OpenJS Foundation Appium Practice Exam, Exams of Technology

This exam evaluates understanding of the Appium automation ecosystem, mobile device testing frameworks, WebDriver protocol fundamentals, CI/CD test integration, and multi-platform automation strategies. Candidates practice writing and reviewing Appium test assets, debugging automation pipelines, understanding cross-platform driver architecture, and contributing to Appium community modules.

Typology: Exams

2025/2026

Available from 01/12/2026

shilpi-jain-1
shilpi-jain-1 🇮🇳

4.2

(5)

29K documents

1 / 91

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
OpenJS Foundation Appium Practice
Exam
**Question 1.** Which type of mobile application runs entirely on the device without a web
view?
A) Hybrid
B) Mobile Web
C) Native
D) Progressive Web App
Answer: C
Explanation: Native apps are compiled for the platform’s runtime and run directly on the device
without any embedded web view.
**Question 2.** In Appium’s “Four Philosophies,” which principle refers to the ability to write
tests in any programming language?
A) No app recompilation
B) Any language binding
C) Standard APIs
D) Opensource
Answer: B
Explanation: Appium exposes languagespecific client libraries, allowing tests to be written in
Java, Python, Ruby, etc.
**Question 3.** Which protocol did Appium adopt to become W3Ccompliant for newer
browsers and mobile drivers?
A) JSON Wire Protocol
B) Selenium Grid Protocol
C) W3C WebDriver Protocol
D) HTTP REST Protocol
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b

Partial preview of the text

Download OpenJS Foundation Appium Practice Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which type of mobile application runs entirely on the device without a web view? A) Hybrid B) Mobile Web C) Native D) Progressive Web App Answer: C Explanation: Native apps are compiled for the platform’s runtime and run directly on the device without any embedded web view. Question 2. In Appium’s “Four Philosophies,” which principle refers to the ability to write tests in any programming language? A) No app recompilation B) Any language binding C) Standard APIs D) Open‑source Answer: B Explanation: Appium exposes language‑specific client libraries, allowing tests to be written in Java, Python, Ruby, etc. Question 3. Which protocol did Appium adopt to become W3C‑compliant for newer browsers and mobile drivers? A) JSON Wire Protocol B) Selenium Grid Protocol C) W3C WebDriver Protocol D) HTTP REST Protocol

Exam

Answer: C Explanation: The W3C WebDriver Protocol is the industry standard that replaces the older JSON Wire Protocol. Question 4. What is the primary role of the UiAutomator2 driver in Appium? A) Interact with iOS devices B) Provide image‑recognition capabilities C) Automate Android native apps D) Manage Appium server lifecycle Answer: C Explanation: UiAutomator2 is the default driver for Android native and hybrid app automation in Appium. Question 5. Which component on an iOS device translates Appium commands into native UI actions? A) Bootstrap B) WebDriverAgent C) Espresso D) Selendroid Answer: B Explanation: WebDriverAgent (WDA) runs on iOS devices and receives HTTP commands from Appium, converting them into XCUITest actions. Question 6. In Appium 2.x, how are drivers and plugins installed? A) Manually copying JAR files B) Using the Appium CLI with appium driver install and appium plugin install

Exam

B) automationName: "XCUITest" C) platformName: "iOS" D) deviceName: "iPhone Simulator" Answer: B Explanation: Setting automationName to "XCUITest" selects the iOS XCUITest driver. Question 10. What does the noReset capability control? A) Whether the app is re‑installed before each session B) Whether the device is rebooted after the session C) Whether Appium clears app data between sessions D) Whether the simulator is deleted after the test Answer: C Explanation: noReset:true tells Appium to keep the app’s state (data, preferences) intact between sessions. Question 11. Which locator strategy is considered the “gold standard” for cross‑platform mobile testing? A) XPath B) Class Name C) Accessibility ID D) ID Answer: C Explanation: Accessibility ID works on both Android and iOS and is fast and reliable. Question 12. On Android, which UIAutomator selector allows you to locate an element by its text value?

Exam

A) new UiSelector().resourceId("...") B) new UiSelector().text("...") C) new UiSelector().className("...") D) new UiSelector().description("...") Answer: B Explanation: .text("...") matches the visible text of a UI element. Question 13. Which iOS predicate string would locate a button whose label contains the word “Submit”? A) type == 'XCUIElementTypeButton' AND name CONTAINS 'Submit' B) label == 'Submit' C) name == 'Submit' D) type == 'Button' && label == 'Submit' Answer: A Explanation: Predicate strings use type, name, and label with operators like CONTAINS. Question 14. Which gesture is NOT directly supported by the legacy TouchAction API but is available in the W3C Actions API? A) Tap B) Long Press C) Pinch D) Swipe Answer: C Explanation: Pinch/Zoom requires multi‑pointer actions, which are only available via the W3C Actions API.

Exam

Question 18. When a test fails, which Appium feature can automatically capture a screenshot? A) --log-level error B) autoScreenshot:true capability C) driver.getScreenshotAs(OutputType.FILE) D) --session-override flag Answer: C Explanation: The client API method getScreenshotAs captures the current screen; there is no built‑in capability named autoScreenshot. Question 19. Which Appium command can be used to rotate an Android device to landscape? A) driver.rotate(ScreenOrientation.LANDSCAPE) B) driver.setOrientation("LANDSCAPE") C) driver.orientation("LANDSCAPE") D) driver.toggleAirplaneMode() Answer: B Explanation: driver.setOrientation("LANDSCAPE") changes the device orientation. Question 20. In a CI/CD pipeline, which tool is commonly used to run Appium tests in parallel on multiple devices? A) Maven B) Selenium Grid C) JUnit D) Gradle Wrapper

Exam

Answer: B Explanation: Selenium Grid (or its cloud equivalents) enables parallel execution across multiple nodes/devices. Question 21. Which design pattern separates page element definitions from test logic in mobile automation? A) Singleton B) Factory C) Page Object Model D) Observer Answer: C Explanation: POM encapsulates UI element locators and actions in page classes, keeping tests clean. Question 22. What is the purpose of the Appium “Image Element” plugin? A) To locate elements by OCR text B) To compare screenshots for visual validation C) To locate an element using a reference image on the screen D) To generate image‑based test reports Answer: C Explanation: The Image Element plugin allows locating UI components via template‑matching against a supplied image. Question 23. Which of the following is a valid way to execute a shell command on an Android device via Appium? A) driver.executeScript("mobile: shell", {"command":"pm list packages"})

Exam

A) Grants all runtime permissions automatically when the app is installed B) Disables permission dialogs during the test run C) Grants permissions only for the first test case D) Requires manual interaction to accept permissions Answer: A Explanation: Setting autoGrantPermissions:true automatically accepts all permission requests at install time. Question 27. Which locator strategy should be avoided for performance‑critical tests due to its slowness? A) Accessibility ID B) ID C) Class Name D) XPath Answer: D Explanation: XPath queries traverse the UI hierarchy and are slower compared to native strategies. Question 28. In Appium, which command retrieves the current page source as XML? A) driver.getPageSource() B) driver.getSource() C) driver.pageSource() D) driver.fetchXML() Answer: A Explanation: getPageSource() returns the UI hierarchy in XML format.

Exam

Question 29. Which of the following best describes “flaky” tests? A) Tests that always pass on the first run B) Tests that fail intermittently due to timing or environment issues C) Tests that are written in multiple programming languages D) Tests that never interact with the UI Answer: B Explanation: Flaky tests exhibit nondeterministic failures often caused by synchronization problems. Question 30. When automating a mobile browser on Android, which capability specifies the ChromeDriver executable path? A) chromedriverExecutable B) chromeDriverPath C) webdriverChrome D) chromeOptions Answer: A Explanation: chromedriverExecutable points to a compatible ChromeDriver binary for Chrome automation. Question 31. Which Appium server log level provides the most detailed information for debugging? A) info B) warn C) debug D) trace Answer: D

Exam

Explanation: Page Factory initializes elements on demand, improving readability and performance. Question 35. Which Appium plugin enables video recording of the device screen during a test session? A) image-element B) screenshot C) video D) appium-video-recorder Answer: D Explanation: The appium-video-recorder plugin captures video streams of the device. Question 36. When running tests on BrowserStack, which capability identifies the Appium version to use? A) appiumVersion B) browserstack.appium_version C) appium_version D) browserstack.version Answer: B Explanation: BrowserStack expects the namespaced capability browserstack.appium_version. Question 37. Which of the following statements about adb uninstall is true in the context of Appium? A) It removes the Appium server from the device. B) It uninstalls the target application, useful for a fresh install. C) It clears the device’s cache only.

Exam

D) It resets the device to factory defaults. Answer: B Explanation: adb uninstall <package> removes the app, allowing Appium to reinstall it if needed. Question 38. In iOS automation, what does the usePrebuiltWDA capability control? A) Whether to build WebDriverAgent from source each session B) Whether to use a pre‑installed version of WDA on the device C) Whether to skip signing the WDA bundle D) Whether to run tests on a real device or simulator Answer: B Explanation: usePrebuiltWDA:true tells Appium to use an already built WDA binary, speeding up session start. Question 39. Which method is used to scroll to an element that is not immediately visible on Android using UiScrollable? A) new UiScrollable(new UiSelector()).scrollIntoView(text("...")) B) driver.scrollTo("...") C) driver.swipe(...) D) driver.executeScript("mobile: scroll", ...) Answer: A Explanation: UiScrollable’s scrollIntoView method scrolls until the element with matching text appears. Question 40. Which capability tells Appium to run tests on an Android emulator instead of a real device?

Exam

Question 43. Which of the following is NOT a valid way to locate an element on iOS? A) -ios predicate string B) -ios class chain C) -android uiautomator D) Accessibility ID Answer: C Explanation: -android uiautomator is specific to Android and cannot be used on iOS. Question 44. When using the W3C Actions API, which object represents a single pointer (finger) action? A) PointerInput B) TouchAction C) ActionSequence D) MultiTouchAction Answer: A Explanation: PointerInput defines a pointer (touch, mouse, pen) and its actions. Question 45. What does the autoWebview capability do? A) Automatically switches to the first available webview context after session start B) Enables automatic detection of web elements on native screens C) Forces the app to launch in a web browser D) Disables all native context interactions Answer: A Explanation: autoWebview:true tells Appium to switch to a WebView context as soon as it becomes available.

Exam

Question 46. Which of the following is a recommended practice for maintaining test data across multiple test runs? A) Hard‑code values inside test methods B) Store data in external JSON/YAML files and load at runtime C) Use global static variables in the test class D) Embed data directly in the Appium server configuration Answer: B Explanation: Externalizing test data promotes reusability and easier maintenance. Question 47. Which Appium capability is used to specify the path to an .ipa file for iOS testing? A) app B) ipaPath C) bundleId D) iosApp Answer: A Explanation: The generic app capability points to the .apk or .ipa file location. Question 48. In the context of mobile network testing, which Appium command can toggle airplane mode on Android? A) driver.toggleAirplaneMode() B) driver.executeScript("mobile: toggleAirplaneMode", {"enabled": true}) C) adb shell settings put global airplane_mode_on 1 D) driver.setNetworkConnection(0) Answer: B

Exam

Answer: A Explanation: appium:chromeOptions passes ChromeDriver command‑line arguments for Android Chrome sessions. Question 52. Which of the following is a limitation of using XPath on iOS? A) XPath is not supported at all on iOS. B) XPath queries are evaluated on the client side, causing high latency. C) XPath can only locate elements with accessibility IDs. D) XPath only works with UIAutomation, not XCUITest. Answer: B Explanation: XPath evaluation happens on the device, and iOS’s XCUITest engine makes it slower compared to native locators. Question 53. Which Appium feature allows you to run a test on multiple devices in parallel without code changes? A) Parallel Testing Mode B) Selenium Grid integration with Appium nodes C) Multi‑Device Driver D) Cloud‑based device farm only Answer: B Explanation: By registering multiple Appium nodes to a Selenium Grid hub, tests can run concurrently. Question 54. When automating a mobile app that uses dynamic IDs, which locator strategy is most resilient? A) ID

Exam

B) XPath with contains() C) Class Name D) Accessibility ID Answer: B Explanation: An XPath expression using contains(@resource-id, 'partial') can handle changing IDs. Question 55. Which command is used to retrieve the device’s current battery level via Appium? A) driver.getBatteryInfo() B) driver.executeScript("mobile: batteryInfo") C) driver.getBatteryState() D) driver.batteryLevel() Answer: B Explanation: The mobile: batteryInfo script returns battery level and status. Question 56. What does the appium:ignoreUnimportantViews capability do on Android? A) Skips layout rendering for hidden views, speeding up element lookup B) Disables all background services during testing C) Prevents Appium from interacting with system UI D) Ignores pop‑up dialogs automatically Answer: A Explanation: Ignoring unimportant views reduces the UI hierarchy size, improving performance. Question 57. Which of the following is true about the mobile: scroll script for iOS?