I need to get information from the third-party application using Cocoa Accessibility API. The third-party application uses WebView to show its user interface (AXWebArea
role). This AXUIElement has no children.
if ([role isEqualToString:@"AXWebArea"])
{
NSArray *names;
AXUIElementCopyAttributeNames(foundElement, (CFArrayRef *)&names);
NSLog(@"%@", names);
}
This code outputs:
AXRole,
AXSubrole,
AXRoleDescription,
AXChildren,
AXHelp,
AXParent,
AXPosition,
AXSize,
AXTitle,
AXDescription,
AXValue,
AXFocused,
AXEnabled,
AXWindow,
AXSelectedTextMarkerRange,
AXStartTextMarker,
AXEndTextMarker,
AXVisited,
AXLinkedUIElements,
AXSelected,
AXBlockQuoteLevel,
AXTopLevelUIElement,
AXLinkUIElements,
AXLoaded,
AXLayoutCount,
AXLoadingProgress,
AXURL
AXChildren
is empty, so I cannot access HTML elements inside the AXWebArea
UI element. How can I access them?