Ejemplo n.º 1
0
        public TextRange[] GetVisibleRanges()
        {
            var nativeRanges = ComCallWrapper.Call(() => NativePattern.GetVisibleRanges());

            return(NativeValueConverter.NativeArrayToManaged(Automation, nativeRanges));
        }
Ejemplo n.º 2
0
        public Element[] GetChildren()
        {
            var nativeChildren = ComCallWrapper.Call(() => NativeRange.GetChildren());

            return(NativeValueConverter.NativeArrayToManaged(Automation, nativeChildren));
        }
Ejemplo n.º 3
0
        protected Element[] NativeElementArrayToElements(PropertyId property)
        {
            var nativeElements = Get <UIA.IUIAutomationElementArray>(property);

            return(NativeValueConverter.NativeArrayToManaged(AutomationElement.Automation, nativeElements));
        }
Ejemplo n.º 4
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));
        }