From cb8101d6825ca7e36e5297ede1eb3221f4baeeb6 Mon Sep 17 00:00:00 2001 From: CT4nk3r Date: Fri, 9 Sep 2022 16:48:02 +0200 Subject: [PATCH] Replaced and obsolete function call to the new updated standard --- Tools/UIRecorder/UIRecorder/RecordedUiTask.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/UIRecorder/UIRecorder/RecordedUiTask.cs b/Tools/UIRecorder/UIRecorder/RecordedUiTask.cs index fffae104..faba6d33 100644 --- a/Tools/UIRecorder/UIRecorder/RecordedUiTask.cs +++ b/Tools/UIRecorder/UIRecorder/RecordedUiTask.cs @@ -304,16 +304,16 @@ public static string LeftClick(RecordedUiTask uiTask, string elemName) public static string DoubleClick(RecordedUiTask uiTask, string elemName) { - string codeLine = $" desktopSession.DesktopSessionElement.Mouse.MouseMove(winElem_{elemName}.Coordinates);\n" + - $" desktopSession.DesktopSessionElement.Mouse.DoubleClick(null);\n"; + string codeLine = $" Actions actions = new Actions(desktopSession.DesktopSessionElement);\n" + + $" actions.DoubleClick(winElem_{elemName}).Build().Perform();\n"; return GetCodeBlock(uiTask, elemName, codeLine); } public static string RightClick(RecordedUiTask uiTask, string elemName) { - string codeLine = $" desktopSession.DesktopSessionElement.Mouse.MouseMove(winElem_{elemName}.Coordinates);\n" + - $" desktopSession.DesktopSessionElement.Mouse.ContextClick(null);\n"; + string codeLine = $" Actions actions = new Actions(desktopSession.DesktopSessionElement);\n" + + $" actions.ContextClick(winElem_{elemName}).Build().Perform();\n"; return GetCodeBlock(uiTask, elemName, codeLine); }