Prabin Timsina Prabin Timsina - 5 months ago 94
Java Question

Espresso Android matching textviews inside parent

I have a simple linear layout with two textviews inside it. The linear layout has an unique id but the textviews don't have. How do I verify one of the texts is from those textviews?

I tried the following code:


Unfortunately,its not working for me.I am getting the following error: No views in
hierarchy found matching


Use hasDescendant()

onView(withId(, hasDescendant(withText("Available")))));