1
Espresso库中是否有方法firstMatch()
?现在我得到这个例外Android Espresso执行点击第一场比赛
android.support.test.espresso.AmbiguousViewMatcherException matches multiple views in the hierarchy.
我有一个RecyclerView
和一些物品都显示R.id.textRowBottom
,但不是全部。我想获得第一场比赛并点击它。
它看起来像这样
onView(allOf(withId(R.id.textRowBottom), isDisplayed())).perform(click());
你是在找这个吗? http://stackoverflow.com/a/36866682/1219012 –