android - Espresso : how to click one of image in listview? -
help!!!
i want test android ui in espresso, image every time change.
listview ---framelayout ---imageview ---imageview ---framelayout ---imageview ---imageview
i try way, still can't click:
ondata(is(instanceof(imageview.class))) .inadapterview(withid(r.id.listview)) .atposition(3) .perform(viewactions.click());
error log:
com.google.android.apps.common.testing.ui.espresso.performexception: error performing 'load adapter data' on view 'with id: <2131296725>'. @ com.google.android.apps.common.testing.ui.espresso.performexception$builder.build(performexception.java:67) :doubanmovie:connectedandroidtest failed
i know late others.
ondata(anything()) .inadapterview(withid(listviewid)) .atposition(0) .onchildview(withid(childviewid)) .perform(click());
this click on particular view inside listview customlayout
Comments
Post a Comment