Google Associate Android Developer Exam Practice Questions (P. 5)
- Full Access (107 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #21
To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:
send
light_mode
delete
Question #22
Once your test has obtained a UiObject object, you can call the methods in the UiObject class to perform user interactions on the UI component represented by that object. You can specify such actions as: (Choose four.)
- Aclick() : Clicks the center of the visible bounds of the UI element.
- Btouch() : Touch the center of the visible bounds of the UI element.
- CdragTo() : Drags this object to arbitrary coordinates.
- DmoveTo() : Move this object to arbitrary coordinates.
- EsetText() : Sets the text in an editable field, after clearing the field's content. Conversely, the clearTextField() method clears the existing text in an editable field.
- FswipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown(), swipeLeft(), and swipeRight() methods perform corresponding actions.
Correct Answer:
ACEF
ACEF
send
light_mode
delete
Question #23
If you want to access a specific UI component in an app, use the UiSelector class. This class represents a query for specific elements in the currently displayed
UI. What is correct about it? (Choose two.)
UI. What is correct about it? (Choose two.)
- AIf more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.
- BIf no matching UI element is found, an IOException is thrown.
- CIf more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.
- DIf no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.
Correct Answer:
AD
AD
send
light_mode
delete
Question #24
Each time your test invokes onView(), Espresso waits to perform the corresponding UI action or assertion until the following synchronization conditions are met:
(Choose three.)
(Choose three.)
- AThe message queue is empty.
- BThe message queue is not empty.
- CThere are some instances of AsyncTask currently executing a task.
- DThere are no instances of AsyncTask currently executing a task.
- ESome developer-defined idling resources are not idle.
- FAll developer-defined idling res
Correct Answer:
ADF
ADF
send
light_mode
delete
Question #25
To run your local unit tests, follow these steps:

1. Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.
2. Run your test in one of the following ways (select possible): (Choose three.)
A.

To run a single test, open the Project window, and then right-click a test and click Run
.
B.

To test all methods in a class, right-click a class or method in the test file and click Run
.
C.

To run all tests in a directory, right-click on the directory and select Run tests
.
D.

To run all tests in Project, open the Project window, and then right-click a test and click Run
.

1. Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.
2. Run your test in one of the following ways (select possible): (Choose three.)
A.

To run a single test, open the Project window, and then right-click a test and click Run
.
B.

To test all methods in a class, right-click a class or method in the test file and click Run
.
C.

To run all tests in a directory, right-click on the directory and select Run tests
.
D.

To run all tests in Project, open the Project window, and then right-click a test and click Run
.
send
light_mode
delete
All Pages