【发布时间】:2016-07-07 18:43:07
【问题描述】:
我在 El Capitan (10.11) 上运行 Xcode 7。我正在为 XCUITest 使用新的记录和回放功能。我使用的是 Swift 而不是 Objective-C。这是我到目前为止生成的代码:
func testButton2() {
let app = XCUIApplication()
app.tabBars.buttons["Location"].tap() //tab bar tap
app.buttons["Button"].tap() // button tap
//now verify some text appears in this tab view
}
点击按钮后,我想验证一些文本是否出现在 UILabel 的同一视图中。
有什么想法吗?
我知道这里列出了一堆断言:
http://iosunittesting.com/xctest-assertions/
【问题讨论】:
-
验证书本在哪里?在 UILabel 中?其他观点?