From b082d06c3bc68d9b0d62d94525280f4f09078c12 Mon Sep 17 00:00:00 2001 From: Philip van Ulden Date: Thu, 17 May 2018 15:29:58 -0230 Subject: [PATCH] add support for left mouse click at a specific point --- src/TestStack.White/UIItems/IUIItem.cs | 6 ++++++ src/TestStack.White/UIItems/UIItem.cs | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/TestStack.White/UIItems/IUIItem.cs b/src/TestStack.White/UIItems/IUIItem.cs index be1be5d1..c61d15be 100644 --- a/src/TestStack.White/UIItems/IUIItem.cs +++ b/src/TestStack.White/UIItems/IUIItem.cs @@ -190,6 +190,12 @@ public interface IUIItem : IActionListener, IEquatable /// void Click(); + /// + /// Performs mouse click at a defined + /// + /// Point where to mouse left click + void ClickAt(Point point); + /// /// Performs mouse double click at the center of the UI Item /// diff --git a/src/TestStack.White/UIItems/UIItem.cs b/src/TestStack.White/UIItems/UIItem.cs index 9ee8e194..444fe481 100644 --- a/src/TestStack.White/UIItems/UIItem.cs +++ b/src/TestStack.White/UIItems/UIItem.cs @@ -330,6 +330,15 @@ public virtual void Click() PerformIfValid(PerformClick); } + /// + /// Implements + /// + public virtual void ClickAt(Point point) + { + actionListener.ActionPerforming(this); + mouse.Click(point, actionListener); + } + /// /// Implements ///