【发布时间】:2015-11-11 02:45:48
【问题描述】:
我对 UI 测试很陌生。我的故事板中有一个UITableView,它包含一些单元格。
更新:
我想断言应用程序启动时UITableView 中的单元格数量将超过0。但我不知道如何编写这部分代码。使用NSPredicate?还是其他人?
func testCellsNum()
{
let app = XCUIApplication()
let tableCell = app.tableRows.count
//Then what should I do ?
XCTAssertGreaterThan(tableCell, 0, "should greater than 0")//this line doesn't work
}
【问题讨论】: