ctlchr
ctlchr

Reputation: 1

Testack white unable to find window's children

I have a WPF app that I try to automate using testack white and I'm pretty much stuck at the point where I cannot get any children for a Window (which is embedded in a Panel which is the main Window)

The problem I believe is not necessarily with white but how this app is built because (I'm using VisualUIAVerifyNative as inspector. I tried others as well but haven't seen any children in ControlView, ContentView or RawView): - opening the inspector and expand the tree till that window it shows that this doesn't have any children window_element_no_children - however, if I use Focus Tracking/Hover on mouse feature (e.g. while pressing CTRL the inspector then gives you whatever element the mouse is hovering) then the whole subtree for this window then shows up. Unfortunately, even though I try to find the children at this point through my automation test it still returns me none. window_element_with_children

Does anyone have any idea how exactly I can "force" a check on this window so that the children will then be displayed? Same as how FocusTracking in inspector works like.

Thanks a lot

Upvotes: 0

Views: 78

Answers (1)

RuthlessKnight
RuthlessKnight

Reputation: 39

Have you tried using AutomationElementFinder?

var children = new AutomationElementFinder(window.AutomationElement).Children(
                AutomationSearchCondition.All);

You can try other SearchCondition too.

Upvotes: 0

Related Questions