RFR: 8344581: [TESTBUG] java/awt/Robot/ScreenCaptureRobotTest.java failing on macOS

Alexander Zvegintsev azvegint at openjdk.org
Fri Jan 24 06:54:45 UTC 2025


On Thu, 23 Jan 2025 11:37:23 GMT, Naveen Narayanan <duke at openjdk.org> wrote:

> This contains test fixes for the following issue in ScreenCaptureRobotTest.java
> 
> •	Failures in Mac OS because of mouse pointer visible on top of the image that is screen captured by robot.
> 
> Testing:
> Tested using Mach5(100 times per platform) in MacOS, Linux, Windows & MacOS AArch64. Seen all tests passing.

test/jdk/java/awt/Robot/ScreenCaptureRobotTest.java line 118:

> 116:                 IMAGE_WIDTH, IMAGE_HEIGHT);
> 117: 
> 118:         robot.mouseMove(0,0);

I guess it is safer to move this `mouseMove` call right after the Robot creation, so in case the system is slow and shows a mouse cursor on the screenshot, there is a delay between the mouse movement and the screen capture.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23264#discussion_r1928164834


More information about the client-libs-dev mailing list