The following code snippet shows an example of an Espresso test:
The following code snippet shows an example of an Espresso test:
A . @Rule
fun greeterSaysHello() {
onView(withId(R.id.name_field)).do(typeText("Steve"))
onView(withId(R.id.greet_button)).do(click())
onView(withText("Hello Steve!")).check(matches(isDisplayed()))
}
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()))
}
C . @Test
fun greeterSaysHello() {
onView(withId(R.id.name_field)).do(typeText("Steve"))
onView(withId(R.id.greet_button)).do(click())
onView(withText("Hello Steve!")).compare(matches(isDisplayed()))
}
Answer: B
Latest Associate Android Developer Dumps Valid Version with 107 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments