【发布时间】:2019-04-29 07:15:45
【问题描述】:
这个测试失败是因为
超过 128 个字符的最大长度。你可以解决这个问题 通过使用自定义 NSPredicate 构造查询来限制 指定属性(标签、标题、值、占位符值或 标识符)来匹配。'
func testMessage() {
app.buttons["BEGIN"].tap()
let tablesQuery = app.tables
XCTAssert(tablesQuery.children(matching: .cell).element(boundBy: 0).staticTexts["<EXTREMELY LONG TEXT HERE (200chars)>"].exists)
}
如何转换它,以便在测试文本有效性时绕过 128 个字符的限制。
【问题讨论】: