Pages

Saturday, February 23, 2013

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.


View the original article here

0 comments:

Post a Comment