When I'm using macOS's Accessibility Inspector on apps like notes and Apple mail, I get all the window's children elements. If I use the Inspector on Slack, though, I only get the window and nothing of the content.
Is there a way to force slack to expose its children to the inspector somehow? Same goes for WhatsApp Web and the Apple Pages Canvas.
Found the answer here https://www.electronjs.org/docs/latest/tutorial/accessibility#macos
The
AXManualAccessibility
Attribute of the App must be set tokCFBooleanTrue
.This is how it's done:
AXUIElement
from the app using the process IDAXManualAccessibility
of the newly created AXUIElement tokCFBooleanTrue
Now all elements of the App are inspectable using the Accessibility manager. This not only works for all electron apps, but also apps like Pages or MS Word.
Swift
Objective C