Question

I'm new to coded UI testing, so I have such easy question:

let's say there is an application with main window(just one button that calls secondary window) and secondary window. In this secondary window is container for elements and checkbox inside. I'm trying to write a coded UI test where at first I will open main window, push button that calls secondary window, and in secondary window I want to check/uncheck checkbox(depends on it's default value).

If to run test where I'm not changing state of checkbox, it passes. But when I run this test and change state of checkbox, test fails and I get error :

The playback failed to find the control with the given search properties... Search may have failed at 'id of the container' Pane as it may have virtualized children. If the control being searched is descendant of 'id of the container' Pane then including it as the parent container may solve the Problem.

And this container has set AutomationProperties.AutomationId="id of the container" so coded ui should find it, because it always the same.

When I have a look at UI Control Map, I can find a secondary window, but I cannot find that container(3rd party).

How can I solve this?

Was it helpful?

Solution

The problem was with 3rd party container. Coded UI could not find DocumentWindow within TabbedMdiContainer.

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