AmbiguousViewMatcherException multiple RecyclerViews
You have multiple views with id R.id.recyclerView
in your view hierarchy, therefore espresso lacks to perform correct matching. Make the id
s of those RecyclerView
s unique.
onView(allOf(withId(R.id.recyclerView), isDisplayed()))
onView(withId(R.id.recyclerView)).perform(swipeUp())
But caught error only on second line.
Then perform matching this way:
onView(allOf(withId(R.id.recyclerView), isDisplayed())).perform(swipeUp())