On Tue, 3 Sep 2024 16:41:26 GMT, Harshitha Onkar <[email protected]> wrote:

> ```
>                 frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
>                 System.out.println("Frame is maximized");
>                 robot.waitForIdle();
> ```
> 
> You missed adding delays after frame state changes, in the above case after 
> robot.waitForIdle() adding robot.delay(100) can stabilize the test. This 
> applies to all the places where frame.setExtendedState() is used.

Added the delay after the frame 'Maximized' and there is already a delay in 
getButtonImage() just before taking a screenshot, so that will cover the 
'Normal' case.

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

PR Comment: https://git.openjdk.org/jdk/pull/20777#issuecomment-2327094982

Reply via email to