likitha lokesh
likitha lokesh

Reputation: 11

Xamarin uitest fails to interact with accessibility label for IOS 11.0

Accessibility label of UIView is set to Eg "BackButton" [UIAccessibilityBackButtonElement] label: "BackButton" Xamarin uitest for IOS 11.0 fails to interact with the label app.Flash("BackButton") Flashing query for Marked("BackButton") gave 0 results. [ ] I have tried waitForElement, Query methods, etc.Nothing seems to work. Would be great if someone can help me.

Upvotes: 0

Views: 574

Answers (2)

Ted Harris
Ted Harris

Reputation: 11

It's weird but marked does not match labels. Here is the description per the method documentation.

Matches common values. For Android: An element with the given value as either id, contentDescription or text. For iOS: An element with the given value as either accessibilityLabel or accessibilityIdentifier.

You can find more info via the documentation here, https://developer.xamarin.com/api/member/Xamarin.UITest.Queries.AppQuery.Marked/

Here is a post giving more info: https://forums.xamarin.com/discussion/99701/not-able-to-query-label-text-with-property-label

Upvotes: 1

Vu_Ng
Vu_Ng

Reputation: 48

Does your button with this id appear in DOM when you enter 'tree' in REPL?

Upvotes: 0

Related Questions