Using accessibilityIdentifier for UITests
Environment
- Xcode version: 15.2
- iOS version: 17.0.1
- Devices affected:
- Maps SDK Version: 10.16.0
Observed behavior and steps to reproduce
We are writing Xcode UI Tests for our app. Our test case requires that we tap a marker on the map, which would then launch another feature. In UI Tests, UI elements are accessed via their accessibilityIdentifier. However, we are not able to set an accessibilityIdentifier for the MapBox marker. How can we accomplish this task? Is there a way to set the accessibilityIdentifier, or is there another workaround we must do?
Expected behavior
N/A
Notes / preliminary analysis
N/A
Additional links and references
N/A
Hey @jamesormond What kind of marker we are talking about? Is it a ViewAnnotation or any other kind of Annotations?
We are looking at point annotations and features
@OdNairy just following up on this thread. What is your suggestion?
@jamesormond most of the elements on the MapView are rendered with a Metal as part of the single CAMetalLayer. It is not possible to accessibilityIdentifier for such elements, unfortunately.