Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

UI Automation events stop being received after a while and then restart after some time

$
0
0

We are using Microsoft's UIAutomation framework to develop a client that monitors events of a specific application and responds to them in different ways. We've started with the managed version of the framework, but due to delay issues, moved to the native version wrapped in UIACOMWrapper (can't add link). After more issues with performance inside our (massive) WPF application, we decided to move it to a separate terminal application (transfer the events to our WPF app through UDP) which seemed to fix all the performance issues. The only problem is that it seems that every several minutes, the events for TabSelection, StructureChanged, WindowOpened and WindowClosed stop being captured for a few minutes. Surprisingly PropertyChanged events are still received and handled while this happens. The application continues to perform as usual with windows and dialogs being opened but no events captured other than name and value changes.

In order to find out if this is a bug caused by our code or the wrapper, I tried usingMicrosoft's own AccEvent utility to capture the same events from the monitored application and gotsimilar results (some events stop being captured for periods of time). This leads me to conclude that there is a fundamental bug in the framework somewhere. I can't post the code of the monitored application as it is proprietary and confidential as well, I can say that it is a WinForms application that hosts WPF windows and also quite massive.

Has anyone seen this sort of behavior while working with the UI Automation framework? Thank you for your time.

EDIT: I forgot to mention that I strongly suspect that the issue is that one of the UI-Automation event handler threads gets stuck somehow. The reason I believe this, is that when the problem occurred in my monitor, I started an instance of AccEvent and it received all the missing events that my monitor was not getting. This means that the events are being fired but not passed to my monitor.

Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>