Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Last active December 31, 2015 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitherejoe/fe629ad5acb2869a8cee to your computer and use it in GitHub Desktop.
Save hitherejoe/fe629ad5acb2869a8cee to your computer and use it in GitHub Desktop.
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