I am trying to automate the UI of an app built on JUCE framework on Windows (basically simulate menu items getting clicked, user entering a value in a text box, etc).
I am facing isuses using any UI automation/inspection tool to manipulate the apps
UI; i can only see the root window in any tool; tried FlaInspect, Accesibility Insights, Inspect, all cannot inspect teh apps UI.
Any idea how to get this done?
Is it your JUCE app, or a third-party one? Support for UI automation was only added in JUCE 6, so if the app was built using an earlier version of JUCE, this feature may be unavailable.
Not built by me unfortunately; it’s a binary i execute.
the modern way to do this is called ‘MVVM’. The idea is that the Graphical components are super ‘dumb’ (no business logic) and talk only to a ‘view model’ class. The view-model sits between the plugin logic and the UI framework. It mediates all communication between the two. Any fancy logic like linking two parameters is done by the ‘view model’ never by the graphical components themselves.
If you implement this correctly, it means that you can test your entire plugin without any actual drawing or windowing code. Your tests call methods not on the visible components, but on the view-model to simulate graphic controls being manipulated.
This is super robust as you no longer have to worry about simulating mouse clicks or figuring out where exactly a graphical component is on screen, or worry about other apps stealing the plugins window focus while you are trying to test it, or worry about inserting pauses in your test code to wait for the window or menu to open/close/react to a previous click or whatever.
This might be somewhat useful:
I don’t work on the source code, hence i need ui automation techniques.
Saw this, but it requires acces to the code which is out of scope.