8338488: Add screen capture for failure case

Reviewed-by: azvegint
This commit is contained in:
Tejesh R 2024-08-19 06:42:51 +00:00
parent 2f7ba781bf
commit 56a007dd32

View File

@ -29,6 +29,10 @@ import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
/*
* @test
@ -78,6 +82,12 @@ public class CheckboxCheckerScalingTest {
});
if (!checkmarkFound) {
try {
ImageIO.write(imageAfterChecked, "png",
new File("imageAfterChecked.png"));
} catch (IOException e) {
throw new RuntimeException(e);
}
throw new RuntimeException("Checkmark not scaled");
}
System.out.println("Test Passed");