ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 68 - Associate Android Developer discussion

Report
Export

Android Tests. You can use the childSelector() method to nest multiple UiSelector instances. For example, the following code example shows how your test might specify a search to find the first ListView in the currently displayed UI, then search within that ListView to find a UI element with the text property Apps. What is the correct sample?

A.
UiObject appItem = device.findObject(new UiSelector().className(ListView.class).instance(1).childSelector(new UiSelector().text("Apps")));
Answers
A.
UiObject appItem = device.findObject(new UiSelector().className(ListView.class).instance(1).childSelector(new UiSelector().text("Apps")));
B.
UiObject appItem = device.findObject(new UiSelector().className("android.widget.ListView").instance(0).childSelector(new UiSelector().text("Apps")));
Answers
B.
UiObject appItem = device.findObject(new UiSelector().className("android.widget.ListView").instance(0).childSelector(new UiSelector().text("Apps")));
C.
UiObject appItem = device.findObject(new UiSelector().className("android.widget.ListView").instance(new UiSelector().text("Apps")));
Answers
C.
UiObject appItem = device.findObject(new UiSelector().className("android.widget.ListView").instance(new UiSelector().text("Apps")));
Suggested answer: B
asked 18/09/2024
Joe Mon
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first