On Mon, 19 Aug 2024 09:29:12 GMT, Tejesh R <t...@openjdk.org> wrote: >>> > The test is failing on my windows machine with an error - >>> > _java.lang.RuntimeException: Button renderings are different after window >>> > resize, num of Diff Pixels=1576_ Images are uploaded for reference. >>> >  >>> > >>> >  >>> >>> @TejeshR13 I have run it multiple times on different windows >>> machines(Windows 2022, 10, 11) in mach5 and it passed everywhere and >>> visibly I don't see any differences in the images attached by you. Can you >>> try with the updated test which is attached to the bug(it will generate two >>> diff images if the test fails), so that we will come to know what exactly >>> is the difference between the images. >> >> If u can notice there is a slight positional difference of desktop icon of >> the Java app....... I guess the image comparison includes those also? > >> @TejeshR13 , no, it just compares the Button renderings only, nothing else. >> `bimage = robot.createScreenCapture(new Rectangle(buttonLoc.x, buttonLoc.y, >> button.getWidth(), button.getHeight()));` > > Which is exactly in the image right?
> > > @TejeshR13 , no, it just compares the Button renderings only, nothing > > > else. `bimage = robot.createScreenCapture(new Rectangle(buttonLoc.x, > > > buttonLoc.y, button.getWidth(), button.getHeight()));` > > > > > > Which is exactly in the image right? > > Yes, your images contain the Windows taskbar also, but I'm not sure why it is > taking that also when we capture the screen based on button's dimensions, > could it be because of button.getWidth() and button.getHeight() returning > wrong values? Not wrong values, its just that the button is slightly behind the window icons. Better to move the button up so that it wont mix up with icon. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20532#issuecomment-2296151827