Hi all,
For out automated UI testing, we originally started using the managed UIA libraries, and found them to be quite fast and reliable, however certain UI elements implemented with legacy properties would not have those properties accessible via the managed UIA libraries.
So we switched to using the unmanaged UIA libraries, but we have now encountered a new problem, when there are a large number of UI elements, the FindFirst() and FindAll() calls will throw an exception, even though the the searchCondition we're providing should only return a single match.
In our test environment, one of the screen is a large pharmaceutical drug list table, and that provides a datagrid with around 16,500 items in that part of the UI tree. From my initial observations, it will happen with even less elements even around 8,000 UI elements.
We're using relative references (i.e. getting the IUIAutomationElement reference to the UI element just below the table, and doing the FindFirst() from there) but the exception still occurs.
The frustrating thing is that the managed UIA libraries can handle this fine, but they cause problems where we can't do a number of things such as setValue() from the Value Pattern, and we can't read legacy properties.
Is there any help, update, or fix, to get around the limitation of the unmanaged UIA libraries?