I am using espresso-contrib to perform actions on a RecyclerView
, and it works as it should, ex:
onView(withId(R.id.recycler_view))
.perform(Rec
Just to enhance riwnodennyk's answer, if your ViewHolder
is a ViewGroup
instead of a direct View
object like TextView
, then you can add hasDescendant
matcher to match the TextView
object in the ViewGroup
. Example:
onView(withId(R.id.recycler_view))
.check(matches(atPosition(0, hasDescendant(withText("First Element")))));