New feature in KM11:
There is a popup menu (v11.0+) to scan the front window of a selected application. Ensure the window of interest is the front window in your target application, then select the application in the popup menu. Keyboard Maestro will scan the window. Then select the popup menu and there will be an additional menu of all the buttons in the front window of the target application. Hold the Option key down to sort the buttons (by default they are roughly in the window layout order), and hold the Shift key down to display the details of the button. Buttons can be matched explicitly by Title, or by Description, and can have an array index for duplicate buttons with the same name.
I feel rather stupid, but how do I open that popup menu? (I'm stuck at the first sentence...)