Hello Appium Gurus,
I’ve been working on trying to get some iOS accessibility properties set programmatically so that while using Appium, I can access these elements for automated testing.
Over the past few days, I’ve been unable to get Appium to recognize that these properties have been set and am having trouble determining if Appium even gets these values from the iOS code.
I’ve been working with the developer to make sure that these properties are being set via Code. We’ve added anything relevant by the accessibility properties which might help make the elements identifiable within Appium like below:
profile.tabBarItem.accessibilityIdentifier = @"profile";
profile.tabBarItem.accessibilityLabel = @"profile";
profile.tabBarItem.accessibilityHint = @"profile";
profile.tabBarItem.accessibilityValue = @"profile";
However, Once the app is built and run within Appium these Values never show up or Appium fails to recognize these properties were set. Once in the inspector, I’ve attempted to find these values by selecting “Locator”, Chosing Strategy “accessibility id” and entering value of “profile”. I have also tried just “id”. The appium tool/inspector returns that no elements were found.
The Parent Element to Tab Bar Hierarchy is as follows with a Tab Bar that contains 5 Buttons.
[UIAApplication]->[UIAWindow] → [UIATabBar] ->[UIAButton]
Upon Selecting these through the Inspector the only information that comes up about said button is:
name:
type: UIAButton
value:
label:
enabled: true
visible: false
valid: true
location: {302, 619}
size: {71, 48}
xpath: //UIAApplication[1]/UIAWindow[1]/UIATabBar[1]/UIAButton[5]
So, my questions are as follows:
- Are the properties being set correctly programmatically?
- Can UIAButtons that live under a UIATabBar have these properties set?
- Am attempting to Locate them correctly using the ‘locator’ and ‘value’ properly?
- If this doesn’t show via the Appium inspector, can they still be accessed via scripts running tests even though Appium cannot find these properties?
- Is this a Bug/Issue instead?
Please let me know if i’m missing something. Thanks!