eonist / TestRunner

Simplifies running UI-tests 🏃
MIT License
10 stars 1 forks source link

Add ancestry example to readme #10

Open eonist opened 4 weeks ago

eonist commented 4 weeks ago

Example usage

// let condition: ElementParser.MatchCondition = { element in element.identifier == "accounts.json" && element.elementType == .any }
// let ancestry: [(Int, XCUIElement)]? = ElementParser.ancestry(root: (0, app), condition: condition)
// let parent: XCUIElement? = ancestry?.last?.1
// Swift.print("parent?.elementType:  \(parent?.elementType)")
// Swift.print("parent?.identifier:  \(parent?.identifier)")
// Swift.print("parent?.label:  \(parent?.label)")
// Swift.print("parent?.exists:  \(parent?.exists)")
// parent?.tap(waitForExistence: 5, waitAfter: 0.2)