Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DoubleClick, ContextClick in the UI Recorder #1786

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Tools/UIRecorder/UIRecorder/RecordedUiTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down