Question

At work we have just started using CodedUI, in our product there are a lot of data grids, and while the CodedUI UIMap recorder is capable of picking out individual elements, it does not seem to be able to pick out collections of elements, such as returning a list giving each cell in a column or row, or even more usefully a list of lists, so you can navigate the data in a way that is sensitive to context - I may be interested for instance in checking that the fourth column is always equal to the sum of the second and third.

Is there any way to do this sort of search in CodedUI? So far the only search methods I have come across are those used by the UIMap recorder itself, which should only ever return a single object. Without this I am finding it difficult to make any tests that are particularly useful...

Was it helpful?

Solution

There is method UITestControl.FindMathingControls which returns collection of elements satisfying conditions you set.

As far as I understand this method gives you what you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top