Get the first cell of the table containing the label with the text "cool cell"
What about:
let app = XCUIApplication() app.cells.containing(.staticText, identifier: "cool cell")
If this is not enough, there is a containing version that accepts NSPredicate :
func containing(_ predicate: NSPredicate) -> XCUIElementQuery func containing(_ elementType: XCUIElement.ElementType, identifier: String?) -> XCUIElementQuery
Documentation:
Returns a new query to search for elements that contain a child that matches the specification that you need. [...]
source share