I can see that an element with specific Automation ID has children in the Inspect tool:
But when I try to retrieve them like this:
AutomationElement aPane = mainWindow.FindFirst(TreeScope.Subtree, new PropertyCondition(AutomationElement.AutomationIdProperty, "8264"));
AutomationElementCollection theChildren = aPane.FindAll(TreeScope.Subtree, Condition.TrueCondition);
The aPane
element is retrieved correctly, but theChildren
element is empty. Any ideas what went wrong?