I can't seem to execute Voiceover command with JXA. The following AppleScript works.
tell application "VoiceOver"
tell commander to perform command "item chooser"
end tell
However, the following script in JXA throws a mystery error.
vo = Application("VoiceOver")
vo.commander.performCommand("item chooser")
Error 6: An error occurred.
I'd really appreciate any help with this! Thanks so much!