From 15837080020926f8fef1980564f1ee6f8a729b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eero=20M=C3=A4ki-Esko?= Date: Thu, 7 Feb 2019 10:27:45 +0200 Subject: [PATCH] Refactored mouse left click and mouse left double click. Modified new keywords: mouse click mouse double click --- atests/feature_tests/mouse.robot | 12 ++++++------ src/WhiteLibrary/keywords/items/mouse.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atests/feature_tests/mouse.robot b/atests/feature_tests/mouse.robot index 943dab2..1225130 100644 --- a/atests/feature_tests/mouse.robot +++ b/atests/feature_tests/mouse.robot @@ -47,10 +47,10 @@ Verify Mouse Right Click Sleep 2 Verify Label selectionIndicatorLabel right button up -Verify Mouse Left Click +Verify Mouse Click Click Item event_label Sleep 2 - Mouse Left Click + Mouse Click Sleep 2 Verify Label selectionIndicatorLabel left button up @@ -61,14 +61,14 @@ Verify Mouse Right Double Click Sleep 2 Verify Label selectionIndicatorLabel right button up -Verify Mouse Left Double Click +Verify Mouse Double Click Click Item event_label Sleep 2 - Mouse Left Double Click + Mouse Double Click Sleep 2 Verify Label selectionIndicatorLabel left button up Verify Incomplete Mouse Position Exception - ${status} ${error_msg} Run Keyword And Ignore Error Mouse Left Click 300 + ${status} ${error_msg} Run Keyword And Ignore Error Mouse Click 300 ${MOUSE_X} ${MOUSE_Y} Get Mouse Location - Should Contain ${error_msg} Either x or y value missin + Should Contain ${error_msg} Either x or y value missing diff --git a/src/WhiteLibrary/keywords/items/mouse.py b/src/WhiteLibrary/keywords/items/mouse.py index b86515a..c20d5e9 100644 --- a/src/WhiteLibrary/keywords/items/mouse.py +++ b/src/WhiteLibrary/keywords/items/mouse.py @@ -87,7 +87,7 @@ def mouse_right_click(self, x=None, y=None): Mouse.Instance.RightClick() @keyword - def mouse_left_click(self, x=None, y=None): + def mouse_click(self, x=None, y=None): """Left clicks mouse at given position. Position (``x``, ``y``) is relative to application window top left. @@ -115,7 +115,7 @@ def mouse_right_double_click(self, x=None, y=None): Mouse.Instance.RightClick() @keyword - def mouse_left_double_click(self, x=None, y=None): + def mouse_double_click(self, x=None, y=None): """Left double clicks mouse at given position. Position (``x``, ``y``) is relative to application window top left.