Exemplo n.º 1
0
        public AutomationElement GetParent(AutomationElement element, ICacheRequest cacheRequest = null)
        {
            var parent = cacheRequest == null?
                         NativeTreeWalker.GetParent(element.ToNative()) :
                             NativeTreeWalker.GetParent(element.ToNative(), cacheRequest.ToNative());

            return(Automation.WrapNativeElement(parent));
        }
Exemplo n.º 2
0
        public AutomationElement GetPreviousSibling(AutomationElement element, ICacheRequest cacheRequest = null)
        {
            var child = cacheRequest == null?
                        NativeTreeWalker.GetPreviousSibling(element.ToNative()) :
                            NativeTreeWalker.GetPreviousSibling(element.ToNative(), cacheRequest.ToNative());

            return(Automation.WrapNativeElement(child));
        }
Exemplo n.º 3
0
        public AutomationElement GetLastChild(AutomationElement element, ICacheRequest cacheRequest = null)
        {
            var child = cacheRequest == null?
                        NativeTreeWalker.GetLastChildElement(element.ToNative()) :
                            NativeTreeWalker.GetLastChildElementBuildCache(element.ToNative(), cacheRequest.ToNative());

            return(Automation.WrapNativeElement(child));
        }