Within an activity, I have a custom recycler view that contains 2 textviews and 2 buttons as shown below.
The id for the recycling bin icon button is deleteButton. I would like to access this button within espresso testing so that I can mock a click.
Two methods that I have attempted and failed are shown below:
onView(withId(R.id.basket))
.perform(actionOnItemAtPosition(4, click() ));
onView(withText("Cherry"))
.perform(
RecyclerViewActions.actionOnItem(
hasDescendant(withId(R.id.deleteButton)),
ViewActions.click()
)
);
Thank you for any help in advance.
