【发布时间】:2020-05-18 06:56:10
【问题描述】:
我在点击一个简单的文本视图并在文本视图中写一些文本时捕获了一个流程。首先,捕获非常慢,有时它也会跳过一些输入。当我尝试使用捕获的流运行测试时,它在 textview 的 tap() 方法上崩溃了
未能获得匹配的快照:没有找到匹配来自输入 {( 其他, 其他, 其他 )}。
我已经截取了错误的屏幕截图
这是捕获的代码
谁能告诉我我做错了什么或者我该如何克服这个问题。
let app = XCUIApplication()
let textView = app.children(matching: .window).element(boundBy: 0).children(matching: .other).element(boundBy: 0).children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element(boundBy: 0).children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element(boundBy: 1).children(matching: .other).element(boundBy: 1).children(matching: .textView).element
textView.tap()
【问题讨论】:
标签: ios swift iphone xcode xcuitest