Is there a .getElementById() equivalent for UI Automation?

I'm writing JavaScript for UI Automation in Xcode 7.1 beta. Is there a function equivalent to web's .getElementById("id") -- which I can use on the entire .mainWindow() -- without knowing the exact hierarchy of a button's specific container?


The .logElementTree() is so fast and shows me where things are, but the recursive drill down I wrote which goes into each .elements() group looking for name is really slow.


I think .withName() needs to already be pointing to the button's parent ...


Thank you,

David

Is there a .getElementById() equivalent for UI Automation?
 
 
Q