-
Bug
-
Resolution: Not an Issue
-
P3
-
8, 11, 14, 16
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Windows 10, 64 bit, Version 1909
JDK 14.0.1, 64 bit
A DESCRIPTION OF THE PROBLEM :
This problem could be related to the "resolved"JDK-8196605.
I am using Robot.mouseMove() to move the cursor to a specific location on the screen.
This works when e.g. focusing my IDE's (IntelliJ IDEA) window. When I focus another window and Robot.mouseMove() gets called, the mouse doesn't move at all.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
My attached source code is a minimal example showcasing this behavior.
Just start the script, focus the Task Manager or Terminal and wait until "Moving" gets printed.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The cursor should get moved to position (0, 0).
ACTUAL -
The cursor doesn't get moved at all.
---------- BEGIN SOURCE ----------
import java.awt.Robot;
public class Test {
public static void main(String[] args) throws Throwable {
final Robot robot = new Robot();
Thread.sleep(5000);
System.out.println("Moving");
robot.mouseMove(0, 0);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Focus another window, which might work (I tested with Microsoft Edge, WhatsApp Desktop and IntelliJ IDEA, which seem to work. I haven't yet found out, which programs work with that).
FREQUENCY : always
Windows 10, 64 bit, Version 1909
JDK 14.0.1, 64 bit
A DESCRIPTION OF THE PROBLEM :
This problem could be related to the "resolved"
I am using Robot.mouseMove() to move the cursor to a specific location on the screen.
This works when e.g. focusing my IDE's (IntelliJ IDEA) window. When I focus another window and Robot.mouseMove() gets called, the mouse doesn't move at all.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
My attached source code is a minimal example showcasing this behavior.
Just start the script, focus the Task Manager or Terminal and wait until "Moving" gets printed.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The cursor should get moved to position (0, 0).
ACTUAL -
The cursor doesn't get moved at all.
---------- BEGIN SOURCE ----------
import java.awt.Robot;
public class Test {
public static void main(String[] args) throws Throwable {
final Robot robot = new Robot();
Thread.sleep(5000);
System.out.println("Moving");
robot.mouseMove(0, 0);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Focus another window, which might work (I tested with Microsoft Edge, WhatsApp Desktop and IntelliJ IDEA, which seem to work. I haven't yet found out, which programs work with that).
FREQUENCY : always
- relates to
-
JDK-8196605 Robot tests fail on Windows platforms if terminal windows are in the way
-
- Resolved
-