Update InteractionContext to be able to assert the label of an element
Closed this issue · 1 comments
KaneCheshire commented
extension InteractionContext {
func label(of element: Element, is expectedLabel: String) {
XCTAssertTrue(element.underlyingXCUIElement.wait(for: element.label == expectedLabel), "Element did not have the right label before timing out! Expected: \(expectedLabel), actual: \(element.label)")
}
}
annapiktas commented
See Sam's comment on PR.