0

I have created an xCode project, the app runs fine. I have enabled the Accessibility Inspector in the simulator and can see my labels have been applied. The problem is not all of the labels can be found by Instruments.

I can do a logElementTree on the window and this shows my labels for staticText and elements but not for the images. Instead for images I see the file path, i.e. UIAImage: name:/var/mobile/Applications...

I can access images via their numeric index but I would rather use their labels.

Works: window.images()[1] Does not work: window.images()["Next"]

Why are my labels not showing up for images in Instruments but Accessibility Inspector can see them?

lookbadgers
  • 988
  • 9
  • 31
  • did you try clicking on the images while recording a script in UIAutomation? if so, what did they record the events as? – brightintro Jun 22 '13 at 15:46
  • Use accessibility identifiers instead of labels: http://stackoverflow.com/questions/7901100/can-i-set-accessibility-identifier-in-interface-builder-xcode4-2 – Display Name Oct 08 '13 at 10:22

0 Answers0