containing(_:)
Returns a new query that matches elements containing a descendant that meets the logical conditions of the provided predicate.
Declaration
func containing(_ predicate: NSPredicate) -> XCUIElementQueryParameters
- predicate:
The predicate used to evaluate each descendant element.
Return Value
A new query that defines a search that extends the search criteria of the receiver. The new search finds elements that match the original search and contain elements that meet the logical conditions of the provided predicate.
Discussion
The predicate evaluates against objects that conform to the XCUIElementAttributes protocol.