我正在运行一个Espresso测试,以点击RecyclerView中的一个元素。
onView(withId(R.id.recyclerList)).perform(RecyclerViewActions.actionOnItemAtPosition(2, click()));
然而,我遇到了以下错误:java.lang.IllegalStateException: No view holder at position
我已经确认视图id指向了我的RecyclerView,并且我的依赖关系如下:
- com.android.support.test.espresso:espresso-core:2.2.2
- com.android.support.test.espresso:espresso-contrib:2.2.2