Cha*_*man 2 xcode ui-automation xcode-ui-testing ios10.3
自从升级到iOS 10.3以来,我注意到swipeUp()函数只刷了很少量的表视图.其中1次swipeUp()调用已经足够了,现在我有10次调用来做同样的事情.
有人得到了解决方案吗?
所以看起来这是一个好方法,使用XCUIElement的press(forDuration:thenDragTo :)方法.
例如,滚动一个tableview
XCUIApplication().tables.cells.element(boundBy:2).press(forDuration: 1, thenDragTo: XCUIApplication().staticTexts["My Page Header Text"])
Run Code Online (Sandbox Code Playgroud)