I am developing a test automation tool. At the moment, the task is to integrate the UI inspector with Blender. I can easily get information about screens, areas, regions using the python API, but I cannot access all controls within a region (checkbox, textbox, combobox). I would be glad to receive any information.
In the preferences you can turn on Developer Extras and Python Tooltips. And when you right click at an UI element then, the right click menu contains a menu item called Edit Source. With a scripting editor window open the script will open that contains this element as long as it is a python UI script. Also, the tooltip of these elements will now show the Python term for this element.
Some UI elements are in C code though. In this case you have to search in the source code.