ASSOCIATE-ANDROID-DEVELOPER practice question 6 of 25
The following code snippet shows an example of an Espresso test:
Full set: 128 questionsCorrect Answer:
B. @Test
fun greeterSaysHello() {
onView(withId(R.id.name_field)).perform(typeText("Steve"))
onView(withId(R.id.greet_button)).perform(click())
onView(withText("Hello Steve!")).check(matches(isDisplayed()))
}
Keep practicing
Take the free ASSOCIATE-ANDROID-DEVELOPER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ASSOCIATE-ANDROID-DEVELOPER practice questions
- Question 1An overridden method onCreateOptionsMenu in an Activity returns boolean value. What does …
- Question 2Android Tests. You can use the childSelector() method to nest multiple UiSelector instanc…
- Question 3What is a correct part of an Implicit Intent for sharing data implementation?
- Question 4As an example. Our MutableLiveData object, named mLapseTime, is not connected to a Room d…
- Question 5About queries in DAO classes. Room verifies the return value of the query such that if th…
- Question 7In a class extended PreferenceFragmentCompat. What method is used to inflate the given XM…
