FrozenHeart
FrozenHeart

Reputation: 20746

What does the string passed as selector to the UI Tests framework mean

What does the string passed to the square brackets of selectors actually mean?

[app.images[@"swipeleft"] swipeLeft]; // The @"swipeleft" here

XCUIElement *element = app.buttons[@"icon share"]; // The @"icon share" here

It seems for me that it can represent both visible text of the controls and their names. Am I right? What is the actual behavior of control selecting then?

Upvotes: 0

Views: 57

Answers (1)

Che
Che

Reputation: 495

Yes, you are right. It can be accessibility label or accessibility identifier or text on label.

Upvotes: 1

Related Questions