Apple Instruments UIAutomation --> How to return element type from search?

Hello All,


Does anyone know how to get the element type after a search?


For instance, have a look at the code below:


var element = UIATarget.localTarget().frontMostApp().mainWindow().elements().withName("Test Element");


Now "element" is the UIAElement that has the name "Test Element".


I want to find out whether the element is a button or a staticText or a segmentedControl or name of the view or whatever it may be. How to go about this? Help very much appreciated.

XCode, Apple Instruments-OTHER, Mac OS X (10.7)

Posted on Feb 17, 2013 5:17 PM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple Instruments UIAutomation --> How to return element type from search?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.