Esempio n. 1
0
        /// <summary>
        /// Finds the first element which is in the given treescope and matches the condition
        /// </summary>
        public Element FindFirst(TreeScope treeScope, ConditionBase condition)
        {
            var nativeFoundElement = NativeElement.FindFirst((UIA.TreeScope)treeScope, NativeConditionConverter.ToNative(Automation, condition));

            return(NativeValueConverter.NativeToManaged(Automation, nativeFoundElement));
        }
Esempio n. 2
0
        /// <summary>
        /// Finds all elements in the given treescope and condition
        /// </summary>
        public Element[] FindAll(TreeScope treeScope, ConditionBase condition)
        {
            var nativeFoundElements = NativeElement.FindAll((UIA.TreeScope)treeScope, NativeConditionConverter.ToNative(Automation, condition));

            return(NativeValueConverter.NativeArrayToManaged(Automation, nativeFoundElements));
        }