如何单击嵌套在其他视图中的recyclerView

时间:2019-06-20 16:54:22

标签: android-recyclerview android-espresso

This is the attached images of the view hierarchy 我在其他视图中嵌套了一个Recyclerview,每次尝试使用espresso查找该视图时,Espresso都无法在视图层次结构中找到该视图。

我几乎尝试了所有具有不同自定义匹配项的内容

Espresso.onView(allOf(withId(R.id.albumsGridView),isDescendantOfA(withClassName(is(“ android.widget.RelativeLayout”))))))

Espresso.onView(allOf(withId(R.id.albumsGridView),withParent(allOf(withId(R.id.container),withParent(withId(R.id.pager)))))))))

0 个答案:

没有答案