System.Windows.Automation.AutomationElement.GetClickablePoint C# (CSharp) Method

GetClickablePoint() public method

public GetClickablePoint ( ) : System.Point
return System.Point
        public Point GetClickablePoint()
        {
            Point point;
            if (!this.TryGetClickablePoint(out point))
            {
                throw new NoClickablePointException();
            }
            return point;
        }

Usage Example

Example #1
0
        public static void MouseClick(AutomationElement element)
        {
            element.ScrollToIfPossible();
            element.SetFocus();

            var clickablePoint = element.GetClickablePoint();
            Cursor.Position = new System.Drawing.Point((int)clickablePoint.X, (int)clickablePoint.Y);
            mouse_event(MOUSEEVENTLF_LEFTDOWN, 0, 0, 0, 0);
            mouse_event(MOUSEEVENTLF_LEFTUP, 0, 0, 0, 0);
        }
All Usage Examples Of System.Windows.Automation.AutomationElement::GetClickablePoint