After encountering 2 different issues that would have been easily solved with such functionality, here goes my idea:
Having a button (my guess is in UiExplorer) that would start/stop monitoring the interface.
When starting the monitoring, the view tree is captured. The same happens every lets say 50-100 ms (maybe customizable?), while the monitoring is active. When stopped, the UiExplorer will only show the elements that are new, missing, or have changed in any way (including properties) by comparing the initial view tree with all the other ones. Thus, we will be able to get selectors for those tricky elements.
Example1: After performing an action, a loading is displayed. You want to take it into account (on bad days it can last for quite a bit), but when developing, the loading only shows up for a few ms, so you can’t easily grab it with the UiExplorer.
Example2: After clicking a button, a dropdown is showed. When attempting to point with the UiExplorer to one of the elements, after the timeout expires, the dropdown simply disappears. I won’t get into too many details, but I think the dropdown was not actually part of the initial view tree and was getting dynamically generated when clicking the button.
I have looked for similar proposals, and I think these are more or less close to my idea: