Describe the bug
Sometimes the Focused Element Role changing and it shows in the Focused UI Element Inspector, it doesn't changed in Conditional Activation Group.
You can check my 2 screenshot and 2 videos.
I am only reproducing what I have heard. So I don't know if this will help you. BTT gets information about text fields from an app. This does not always work equally well.
BTT can also ask itself which field is active. Activate the box below. As far as I know, the default interval is 2 seconds. However, it can be freely selected with a terminal command. Unfortunately I can't remember this command. The shorter the interval, the more cpu it needs. Something like that.
mhm it seems to work fine here after the update, however it doesn't work with all apps. This relies on the app sending the appropriate change notifications - especially hybrid or electron applications don't always do that. In that case try to enable the checkbox @Frank1 mentioned.
I tried the checkbox that @Frank1 mentioned, but it didn't help.
The interesting thing the Focused UI Element Inspector shows the UI element changes correctly. Only the Conditional Activation Group doesn't know it. I think in this case the app send it, otherwise the Focused UI Element Inspector wouldn't know either.
I will search an exact use case for you.
The focused ui element viewer actively polls (which is quite expensive). The focused element role variables are refreshed lazily based on the system notification to reduce CPU impact
For me, the issue appears to be resolved in Safari, but it seems to persist in Firefox and Chrome.
I can consistently reproduce the issue in Firefox and Chrome by quitting the browser (while BTT is running), and then relaunching the browser. After following those steps, it seems to me that BTT has trouble parsing the AX tree:
I am able to consistently fix the issue by opening any Trigger's 'Advanced Conditions...' and then opening the Focused UI Element Viewer. Clicking around in the browser with the Focused UI Element Viewer will somehow 'kick-start' BTT CAG’s into receiving system notifications once again.
I guess the issue has something to do with the nature of active polling. However, I suspect that 'Focused UI Element Viewer' applies some extra workarounds to force the reparsing and retrieval of the focused application's AX tree.