首页 > 解决方案 > 无法使用 EarlGrey 滚动操作进行滚动

问题描述

我无法滚动表格视图的初始状态。当到达带有长表的页面时,我尝试使用向下滚动,scrollInDirection()但收到错误 ( cannot scroll, scrollview is already at edge)。如果我执行一个swipeUp()操作然后尝试滚动,我可以使用相同的代码上下滚动。如果没有不必要的滑动动作,我无法弄清楚如何滚动。

滚动代码:

EarlGrey.selectElement(with: grey_kindOfClass(UITableView.self)).perform(grey_scrollInDirection(GREYDirection.down, 300))

收到错误:

"NSLocalizedDescription" : "Cannot scroll, the scrollview is already at the edge"

标签: swiftearlgrey

解决方案


推荐阅读