Apple's Accessibility Inspector tool displays the Objective-C class corresponding to the currently inspected UI Element. See NSButtonCell
at the very bottom of this screenshot:
However, how can I extract this information in my own code? The accessibility methods in Apple's seven year old UIElementInspector
sample code do not surface the element's class name.
Reverse engineering the Accessibility Inspector hinted that the Objective-C class name could be obtained via the AXClassName
attribute, but that attribute is always nil for me.