How can I submit some text to SearchView
in androidTest?
onView(withId(R.id.search_src_text)).perform(typeText("text"))
doesn't work for me - app crashes at this line
@Test
fun testSearchViewTextSubmit() {
ActivityScenario.launch(MainActivity::class.java)
onView(withId(R.id.search_action)).perform(click()) // ok
onView(withId(R.id.search_src_text)).perform(typeText("text")) // failed
}
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with id: com.example.test:id/search_src_text