Find a windows control using partial NameProperty in windows automation
See the question and my original answer on StackOverflowYou can iterate on a child collection with the prefefined TrueCondition, like this:
foreach(AutomationElement child in epoWindow.FindAll(TreeScope.Subtree, Condition.TrueCondition))
{
if (child.Current.Name.Contains("whatever"))
{
// do something
}
}
PS: You want to carefully choose the TreeScope if you don't want to kill the performance of your app (if it has a big children hierarchy) or wait indefinitely...