Esempio n. 1
0
        private void btnHighlight_Click(object sender, EventArgs e)
        {
            if (virtualControlListView1.SelectedItems.Count == 0)
            {
                return;
            }
            VirtualTestObject testObject = (VirtualTestObject)virtualControlListView1.SelectedItems[0].Tag;

            UIAHighlight.HighlightVirtualControl(_parentControl.AutomationElement, testObject.BoundingRect);
        }
        public void Click()
        {
            Assert.IsTrue(this.Parent != null);
            UIATestObject parentObject = (UIATestObject)this.Parent;

            Rect?tempRect = UIAHighlight.HighlightVirtualControl(parentObject.AutomationElement, this.BoundingRect);

            if (tempRect == null)
            {
                return;
            }

            Rect rect = (Rect)tempRect;

            ClickOnPointTool.ClickOnPoint((IntPtr)null, new System.Windows.Point(rect.Left + 10, rect.Top + 10));
            //InvokePattern invokePattern = (InvokePattern)parentObject.AutomationElement.GetCurrentPattern(InvokePattern.Pattern);
        }
        public void HighlightControl()
        {
            UIATestObject parentObject = (UIATestObject)this.Parent;

            UIAHighlight.HighlightVirtualControl(parentObject.AutomationElement, this.BoundingRect);
        }