Unit 3: Android Native Apps Automation with Appium - Subjective Questions

CSE379 — Mobile Automated Testing • Practice Questions with Detailed Answers

20 questions

1

Define ID, XPath, and Accessibility ID locators in Appium. Compare them based on syntax, reliability, and execution speed.

2

Explain how an Android element can be located and clicked using its resource ID. Give an Appium example and mention important precautions.

3

Distinguish between absolute XPath and relative XPath in Android automation. Why should relative XPath normally be preferred?

4

What is an Accessibility ID in Appium? Explain its relationship with Android's content-desc attribute and state its advantages.

5

Describe how Appium returns a list of matching elements on an Android screen. How does findElements differ from findElement?

6

Explain how mobile pop-ups, Android permission dialogs, and application alerts can be handled in Appium.

7

How can text be extracted from an Android element and information be entered into input fields using Appium?

8

Describe the application features and test cases that should be identified before automating a mobile shopping application.

9

Design an Appium test case for filling and submitting customer details in a mobile shopping application.

10

What is an Android toast message? Explain how an error-validation toast can be verified using Appium.

11

Discuss the challenges involved in validating toast messages and suggest techniques for making toast-validation tests reliable.

12

Explain how UiScrollable and UiSelector can be used to scroll through an Android product list in Appium.

13

Describe how a swipe-based scroll can be implemented with Appium's W3C Actions API. Compare it with text-based UiScrollable scrolling.

14

Develop an approach for dynamically selecting a product by scanning the visible product list based on its text.

15

How can a product-scanning test determine that it has reached the end of a dynamically loaded list and avoid an infinite scroll loop?

16

Derive the logic for validating the total amount displayed in a shopping cart when multiple product prices are shown.

17

Design a complete test case for validating cart contents and the total amount after adding products dynamically.

18

Explain how user-defined functions can optimize Appium test code. Provide examples of reusable functions for shopping-app automation.

19

Why are explicit waits important in Android native-app automation? Explain how waits improve tests involving lists, pop-ups, forms, and scrolling.

20

Propose a maintainable automation framework structure for testing an Android shopping application with Appium.