UITabBarButton not taking accessibilityIdentifier

We are setting our setting the `accessibilityIdentifier` for our `tabBarItem` in the init method of our view controllers. We are using storyboards and setting the title and image for the `tabBarItem` from the storyboard.


In iOS 9.x this worked fine and we could reference the correct tab bar button. In iOS 10 the `accessibilityIdentifier` is no longer set correctly at runtime


Has anyone else encountered this? Is there a known solution?

+1


We are seeing the same issue.


The only solution we've found so far is to use the actual tab name to grab the element.


Have you opened a Radar?

Please Report a bug.

We have the same problem.

Can you show how you to do it?

Same here. Trying to fetch a TabBarItem in UITests without relying on localization or index, but it keeps querying agains TabBarButtons instead, which does not contain the accessibilityIdentifier in my TabBarItems.

.Any updates? I came here from http://www.openradar.me/28587887

I'm on 11.2 and still seeing this issue (item's accessibilityIdentifier not propogating to the button) and it's making it hard for UI testing

UITabBarButton not taking accessibilityIdentifier
 
 
Q