TypeText
doesn't seem to work with SearchView
.
onView(withId(R.id.yt_search_box))
.perform(typeText("how is the weather?"));
gives the error:
Error performing 'type text(how is the weather?)' on view 'with id:../yt_search_box'
TypeText
doesn't seem to work with SearchView
.
onView(withId(R.id.yt_search_box))
.perform(typeText("how is the weather?"));
gives the error:
Error performing 'type text(how is the weather?)' on view 'with id:../yt_search_box'
For anyone that bump into this problem too, the solution is to write a ViewAction for the type SearchView, since the typeText only supports TextEditView
Here my solution: