RFR: 8353138: Screen capture for test TaskbarPositionTest.java, failure case [v3]
Alexey Ivanov
aivanov at openjdk.org
Thu Apr 3 13:10:56 UTC 2025
On Thu, 3 Apr 2025 13:04:22 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updated based on suggesion
>
> test/jdk/javax/swing/Popup/TaskbarPositionTest.java line 223:
>
>> 221: } catch (IOException e) {
>> 222: e.printStackTrace();
>> 223: }
>
> It's not quite what I wanted to see…
>
>
> private static void saveScreenCapture(Robot robot, GraphicsDevice[] screens) {
> for (int i = 0; i < screens.length; i++) {
> Rectangle bounds = screens[i].getDefaultConfiguration()
> .getBounds();
> BufferedImage image = robot.createScreenCapture(bounds);
> try {
> ImageIO.write(image, "png",
> new File("Screenshot" + i + ".png"));
> } catch (IOException e) {
> e.printStackTrace();
> }
> }
> }
And `screens` variable already exits in `main`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24286#discussion_r2026961940
More information about the client-libs-dev
mailing list