Context
I have an application (let's call it App.app) that I'd like to automate using JXA. It doesn't show up in Script Editor's Dictionary. I guess that means that it does not expose an api to osascripts. But when I inspect App.app with Accessibility Inspector, all the UI elements that I want to manipulate by the automation are available. I can see the hierarchy and can click on them through Accessibility Inspector.
Question(s)
How can I use JXA or AppleScript to navigate the accessibility model of App.app so that I can click on the its UI elements? If impossible with JXA, what's the easiest way to accomplish that? Can you recommend a good source if information about JXA and exploiting applidations' exposed accesiblitiy options?
Research
I perused through "Similar questions" just now. Some, like this one seem to offer ways to explore towards solution. There is the Apple's description of accessibility model. But it focuses mostly on exposing accessibility options, not exploiting them.
Specifics
The app I'm automating is RubyMine/Intellij. Among other things, I want the automation to start a bunch of console tabs, run a certain command in each and rename each accordingluy.
Relevance
Finding the solution to this can empower anyone wanting to automate any application that exposes accessibility option