How do I assert a button exists by his accessibilityLabel or identifier?
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?
}
See Question&Answers more detail:os