我想测试向左滑动以删除,但它触发了ViewPager
滑动动作,如何解决?
onView(withId(R.id.orders)).perform(
RecyclerViewActions.actionOnItemAtPosition<ProductItemViewHolder>(
1,
swipeLeft()
)
)
答案 0 :(得分:0)
测试此:
onView(withId(R.id.rv_recyclerview)).perform(
RecyclerViewActions.actionOnItemAtPosition(0, new GeneralSwipeAction(
Swipe.SLOW, GeneralLocation.BOTTOM_RIGHT, GeneralLocation.BOTTOM_LEFT,
Press.FINGER)));