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
Try this, I haven't tested this but I found some research on the API and I think this may solve your problem.
It seems for the accessibility API to fully work the application needs to be trusted or basically have root access. Is the application running in root?
I found some apple script from a past project. seemed relevant
NSDictionary *errorInfo = [NSDictionary new];
NSString *script = [NSString stringWithFormat:@"do shell script \"%@ %@\" with administrator privileges", @"/usr/sbin/lsof",@"-c filecoord"];
NSLog(@"Running... %@",script);
NSAppleScript *appleScript = [[NSAppleScript new] initWithSource:script];
NSAppleEventDescriptor * eventResult = [appleScript executeAndReturnError:&errorInfo];
This apple script isn't excatily what you need but its a start. I'm not sure how to fully request root access to an application from inside the application its self, But for testing, you can always just run your application as root and continue your debugging
Please let me know if this helped you in any way or not