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)));
 }
Beispiel #2
0
        public MyUIElement(RPARemoteObj context)
        {
            this.context           = context;
            node                   = new UiElement(SelectorStrategy.DEFAULT);
            node.Timeout           = 30000;
            node.WaitForReadyLevel = WaitForReady.INTERACTIVE;
            var selector = context.selector;

            if (!string.IsNullOrEmpty(selector))
            {
                Selector  filter = new Selector(selector);
                FindScope scope  = filter.IsTopLevel() ? FindScope.FIND_TOP_LEVELS : FindScope.FIND_DESCENDANTS;
                node = node.FindFirst(scope, filter);
            }
        }
Beispiel #3
0
 public static ChangesGroupBox FindChangesGroupBox(this UiElement element, string name) => element.FindFirst(
     TreeScope.Descendants,
     new AndCondition(Conditions.GroupBox, Conditions.ByNameOrAutomationId(name)),
     x => new ChangesGroupBox(x));