【发布时间】:2017-05-17 12:16:01
【问题描述】:
我如何通过其可访问性标签或标识符断言按钮存在?
func testExitsButton() {
XCTAssertTrue(app.windows.containing(.button, identifier: "Button Text").element.exists)
XCTAssertTrue(app.buttons["Button Text"].exists)
XCTAssertTrue(app.buttons["test"].exists) <- I want this, instead of accessing the text property I want by specific id, maybe the text property override the accessibilityLabel?
}
【问题讨论】: