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: Resolves #2259 doubleClick and rightClick issue #2376

Merged
merged 1 commit into from
Aug 5, 2023
Merged
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
19 changes: 15 additions & 4 deletions karate-robot/src/main/java/com/intuit/karate/robot/RobotBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public Robot click() {

@Override
public Robot rightClick() {
return click(3);
return click(2);
}

@Override
Expand All @@ -299,9 +299,20 @@ public Robot click(int num) {

@Override
public Robot doubleClick() {
click();
delay(40);
click();
if (highlight) {
getLocation().highlight(highlightDuration);
int toDelay = highlightDuration;
if (toDelay > 0) {
RobotUtils.delay(toDelay);
}
}
int clickType = mask(1);
robot.mousePress(clickType);
robot.mouseRelease(clickType);
RobotUtils.delay(100);
robot.mousePress(clickType);
robot.mouseRelease(clickType);

return this;
}

Expand Down