Within User Defined Runtime Attributes I set accessibilityIdentifier
's value as browseTabBarButton
.
But when I try to access this from UITests
using:
app.tabBars.buttons["browseTabBarButton"]
UITabBarItem
is not recognized. Why?
If you are trying to access the UITabBarItem
to switch tabs, you can achieve this in a different way by accessing the buttons within the UITabBar
:
app.tabBars.firstMatch.buttons.element(boundBy: 0).tap()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With