【发布时间】:2018-05-22 23:28:07
【问题描述】:
我有一个 UITest,只要调用 fastlane 来获取我的应用程序屏幕截图,它就会运行。我有一段代码如下:
app.children(matching: .window)
.element(boundBy: 0).children(matching: .other)
.element.children(matching: .other)
.element(boundBy: 1).children(matching: .other)
.element(boundBy: 3).press(forDuration: 1.8)
snapshot("EffectsScreenshot")
但是,这不会产生我想要的效果。相反,我想按下元素,拍摄快照,然后从屏幕上释放压力。目前有什么方法可以在 UI 测试中实现这一点?
【问题讨论】:
-
那么,我猜你有一些代码可以在你从屏幕上松开手指时做一些事情?可以分享一下吗?
标签: swift xctest xcode-ui-testing