Exemplo n.º 1
0
        public void Wpf_GetNullElementThroughMethodReturnValue_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_wTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern);

            var wNullElementFromProperty = p.WrappedGetNullElement();

            Assert.IsNull(wNullElementFromProperty);
        }
Exemplo n.º 2
0
        public void Wpf_GetElementThroughProperty_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_wTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern);

            var wElementFromProperty = p.CurrentWrappedElement;

            Assert.IsTrue(_wTestControlElement.Equals(wElementFromProperty));
        }
Exemplo n.º 3
0
        public void Native_GetNullElementThroughMethodReturnValue_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_nTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern.Id);

            var nNullElementFromMethodRetVal = p.NativeGetNullElement();

            Assert.IsNull(nNullElementFromMethodRetVal);
        }
Exemplo n.º 4
0
        public void Native_GetElementThroughMethodReturnValue_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_nTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern.Id);

            var nElementFromMethodRetVal = p.NativeGetCurrentElement();

            Assert.IsTrue(_nFactory.CompareElements(_nTestControlElement, nElementFromMethodRetVal) != 0);
        }
Exemplo n.º 5
0
        public void Native_GetElementThroughProperty_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_nTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern.Id);

            var nElementFromProperty = p.CurrentNativeElement;

            Assert.IsTrue(_nFactory.CompareElements(_nTestControlElement, nElementFromProperty) != 0);
        }
Exemplo n.º 6
0
        public void Wpf_GetElementThroughMethodOutParam_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_wTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern);

            AutomationElement wElementFromProperty;

            p.WrappedGetCurrentElementWithOutParam(out wElementFromProperty);
            Assert.IsTrue(_wTestControlElement.Equals(wElementFromProperty));
        }
Exemplo n.º 7
0
        public void Native_GetElementViaOutParam_Works()
        {
            AutomationElementRetievingPattern.Initialize();
            var p = (IAutomationElementRetievingPattern)_nTestControlElement.GetCurrentPattern(AutomationElementRetievingPattern.Pattern.Id);

            IUIAutomationElement nElementFromMethodOutParam;

            p.NativeGetCurrentElementWithOutParam(out nElementFromMethodOutParam);
            Assert.IsTrue(_nFactory.CompareElements(_nTestControlElement, nElementFromMethodOutParam) != 0);
        }