AppleScript UI Scripting and click

I would like to click and have automatic action with a software, I can refer to it and get the value of the text but can't manage to click

tell application "System Events" to tell process "app"

    click static text "General Info" of UI element 1 of row 1 of table 1 of scroll area 1 of front window

end tell

This return missing value

and if I do select static text "General Info" of UI element 1 of row 1 of table 1 of scroll area 1 of front window then I have a return (but no click obviously)

what can I do to click in this area ?

I have a similar issue with a dropdown menu with I have to select and set a value

set value of pop up button 1 of group 3 of group 2 of scroll area 1 of group 3 of front window to "Open"

I can't manage to select a value (for example the second value inside the menu)


Solution 1:

You can try using Automator “Watch Me Do” and record your actions in that business application. When you are done recording your actions, you can select all of those recorded actions and copy them to your clipboard. You can then paste into a script editor document. From there you will be able to see the commands and UI elements then just backward engineer them to suit your needs

For example in this following image, the commented code was what I pasted into script editor from the copied commands of “Watch me do” in Automator. The compiled code was my re-wording of it

enter image description here