While debugging automated tests in our custom automation framework we are currently updating our code’s locators from mostly Xpaths to ID’s so that we can have more consistency in locating the right elements.
On the IOS side I was having some trouble finding an element. I requested our IOS team to give us some custom ID’s which they happily provided. Upon the applications update, I checked if the new elements with ID’s were present on a real device in TestProject using the element locator/explorer. They were not. Using our applications in house UIViewer I could see that the element had indeed gained the requested AccessibilityIdentifier. This does not show on the element explorer. I can’t select accessibilityid with the element locator and cant find the element using other strategies. AccessibilityID was present upon creating an element with TP. Trying to find the created element on the real device again failed.
After digging a bit I find that appium provides the following locator strategies: Find Elements - Appium. The IOS side relies on appiums xcuitest driver (GitHub - appium/appium-xcuitest-driver: Appium iOS driver, backed by Apple XCUITest) which is a combination of WDA and apple’s XCTest framework.
I assume testproject uses the same libraries to access native IOS elements. Why does the resulting xml not match the application’s data? How can i properly leverage the AccessibilityID locator strategy?
If someone can nudge me in the correct direction I would be mightily appreciated.
Thanks in advance.