public static IReadOnlyList <TextBlock> FindTextBlocks(this UiElement container, string automationId) { return(container.FindAllDescendants( new AndCondition( Conditions.ByClassName("TextBlock"), Conditions.ByNameOrAutomationId(automationId))) .Cast <TextBlock>() .ToList()); }
public static IReadOnlyList <TextBox> FindTextBoxes(this UiElement container) { return(container.FindAllDescendants(Conditions.ByClassName("TextBox")) .Cast <TextBox>() .ToList()); }