Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Last active Dec 31, 2015
Embed
What would you like to do?
List<String> categoryList = getCategoriesArray();
for (int i = 0; i < categoryList.size(); i++) {
// We don't need to click on the first item as it's already in focus
if (i > 0) {
onView(withId(R.id.browse_headers))
.perform(RecyclerViewActions.actionOnItemAtPosition(i, click()));
}
onView(withItemText(categoryList.get(i), R.id.browse_headers))
.check(matches(isDisplayed()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment