For iOS Accessibility or ID

Hello,

I have Elements on a iPhone which i can find with

   @iOSFindBy(accessibility = "someElementA")
    protected MobileElement turnOnNotificationsButton;

and

@iOSFindBy(id = "someElementB")
    protected MobileElement someElementB;

One documentation i found says that if you use id Appium will try first to use the Accessibility ID and then the ID.

https://saucelabs.com/blog/advanced-locator-strategies

My question is what is better?

Hi @Felix

From what I have seen both works great. But generally when working with Appium

It will first try to search for an accessibility id that matches. If there is none found, a string match will be attempted on the element labels. Finally, if the id passed in is a localization key, it will search the localized string

Sometimes it may also come down to what is available to you.