如何在 Espresso 测试中向下滚动到 ScrollView 的底部? 谢谢!
最佳答案
如果您需要在 ScrollView 的底部找到一个 View 并与之匹配,那么只需对其执行 scrollTo()
操作,然后再执行任何其他需要显示它的操作.
onView(withId(R.id.onBottomOfScrollView))
.perform(scrollTo(), click());
Note: scrollTo will have no effect if the view is already displayed so you can safely use it in cases when the view is displayed
关于android - Espresso : how to scroll to the bottom of ScrollView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30387255/