macOS accessibility API on WebKit applications with AXTextMarker
I need to access data from webkit applications such as Safari, Mail and maybe others. I can see in the Accessibility Inspector there is : AXTextMarker and AXTextMarkerForRange . I tried the usual way to get this info : AXUIElementRef systemWideElement = AXUIElementCreateSystemWide(); //creating system wide element AXUIElementRef focussedElement = NULL; AXError error = AXUIElementCopyAttributeValue(systemWideElement, kAXFocusedUIElementAttribute, (CFTypeRef *)&focussedElement); //Copy the focused if (error != kAXErrorSuccess){ NSLog(@"Could not get focused element"); }else{ AXValueRef marker =