public static Row <T> FindRow <T>(this UiElement container, string header, Func <AutomationElement, T> wrap) where T : UiElement { return(container.FindFirst( TreeScope.Children, new AndCondition(Conditions.ControlTypeCustom, Conditions.ByNameOrAutomationId(header)), x => new Row <T>(x, wrap))); }
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 ChangesGroupBox FindChangesGroupBox(this UiElement element, string name) => element.FindFirst( TreeScope.Descendants, new AndCondition(Conditions.GroupBox, Conditions.ByNameOrAutomationId(name)), x => new ChangesGroupBox(x));