I'm doing a C# windows form application that automate another win32 application using System.Windows.Automation classes.
There are some elements that I need to read or interact but UISpy don't find these fields, it only found the parent container panel.
For example, this code block below should return many toolstrip buttons but doesn't work:
var mainWindow = AutomationElement.RootElement.FindChildByNamePart("Back Office Control");
var mainWindowChildren = mainWindow.FindAll(TreeScope.Children, Condition.TrueCondition);
var toolBarPanel = mainWindowChildren[1];
var toolBarItens = toolBarPanel.FindAll(TreeScope.Children, Condition.TrueCondition);
There is another way to do this?