Skip to content

Instantly share code, notes, and snippets.

@catalinghita8
Last active August 31, 2020 12:50
Show Gist options
  • Save catalinghita8/298b5bb213ba35939c322ff3898c1936 to your computer and use it in GitHub Desktop.
Save catalinghita8/298b5bb213ba35939c322ff3898c1936 to your computer and use it in GitHub Desktop.
@Test
public void contentTest() {
// quick check if the ListView is visible
onView(withId(R.id.list)).check(matches(isDisplayed()));
// click on a certain child view from the loaded list
onData(allOf()).inAdapterView(withId(R.id.list_news)).atPosition(i)
.perform(click());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment