I am writing automated test for a WPF desktop application; and the list of int I see on screen doesn't match the list I get from AutomationElement.FindAll() when searching for TreeScope.Children and condition IsContentElementProperty == true. The list returned from the AE appears to be missing duplicate entries. How can I get the complete list that is displayed to the user? I am also using Inspect Object (64-bit) and it has removed the duplicates as well. I have a nice screenshot of my UI and Inspect Object side by side showing different list items. Sorry if this is the wrong forum. And thanks in advance for any insights provided!!!
Details:
I am testing the output of a device. I request a number of readings, say 30, and I want to verify that the device is functioning correctly. The device returns int values. Unfortunately, I don't know the values ahead of time and can't guarantee that there are no duplicate values. In fact, it shouldn't matter, the device returns the readings regardless of what they are. So, my first test of the data was to verify that I got the requested number of readings. But as my problem suggests, I don't get the correct count back.
We are doing automated testing; and we were given a library of tools that use AutomationElement to interact with the UI. I can make minor changes if needed, but I can't do manual testing or write a new test library. And for the time being we are testing on Windows 7; though as development progresses we will likely update to a newer OS.