1

I have recycler view with children textviews. I would like to verify that a text is not present in the recycler view without the need of scrolling it.

Current solution works but is too hacky i think.

@Test(expected = PerformException.class)
public void verifyUserIsNotPresentInParticipantsList() {
    onView(withId(R.id.fab)).perform(click());
    onView(withId(R.id.recyclerView)).perform(scrollTo(hasDescendant(withText("My Text"))));
}
Prabin Timsina
  • 2,131
  • 3
  • 16
  • 27
  • 1
    Explain what isn't working in your "current solution" and what you've tried so far to fix it. – alzee Aug 03 '16 at 22:34
  • Possible duplicate of [How to assert inside a RecyclerView in Espresso?](http://stackoverflow.com/questions/31394569/how-to-assert-inside-a-recyclerview-in-espresso) – piotrek1543 Aug 17 '16 at 06:50

0 Answers0