matching(_:identifier:)
Returns a new query that matches elements of the requested type and have an identifying property that matches a provided identifier.
Declaration
func matching(_ elementType: XCUIElement.ElementType, identifier: String?) -> XCUIElementQueryParameters
- elementType:
The element type to match.
- identifier:
An optional string to match against any one of each element’s identifying properties: Identifier, Title, Label, Value, or Placeholdervalue.
Return Value
A new query that defines a search that extends the search criteria of the receiver. The new search matches elements that match the original search of the requested type that have an identifying property matching a provided identifier. For the list of the types, see XCUIElement.ElementType.