I encountered a wierd drawback.
I used AXUIElement to get the focusedUIElement in Google, and it labored properly. However after I ran the identical code once more the subsequent day, it did not work.
After comparability, I remembered that I launched the Accessibility Inspector final time, however not this time. So I launched it, after which the code labored once more.
Because of this, I recursively queried every little one ingredient and located that if I hadn’t launched Accessibility Inspector, there was no ingredient whose function was AXWebArea returned within the little one components.
The difficulty the place the code stops working solely happens after restarting the Mac, not when exiting the Accessibility Inspector.
Has anybody encountered this drawback?
The details about my Mac is as follows:
MacBook Air (Apple M1)
macOS 14.0
Xcode 15.0.1