I am using the UI Automation COM-to-.NET Adapter to read the contents of the target Google Chrome browser that plays a FLASH content on Windows 7. It works.
I succeeded to get the content and elements. Everything works fine for some time but after few hours the elements become inaccessible.
The (AutomationElement).FindAll()
returns 0 children.
Is there any internal undocumented Timeout used by UIAutomation ?
According to this IUIAutomation2 interface There are 2 timeouts but they are not accessible from IUIAutomation interface. IUIAutomation2 is supported only on Windows 8 (desktop apps only).
So I believe there is some timeout. I made a workaround that restarts the searching and monitoring of elements from the beginning of the desktop tree but the elements are still not available. After some time (not sure how much) the elements are available again. My requirements are to read the values all the time as fast as possible but this behavior makes a damage to the whole architecture. I read somewhere that there is some timeout of 3 minutes but not sure.
if there is a timeout, is it possible to change it ? Is it possible to restart something or release/dispose something ? I can't find anything on MSDN.
Does anybody have any idea what is happening and how to resolve ?