8338488: Add screen capture for failure case
Reviewed-by: azvegint
This commit is contained in:
parent
2f7ba781bf
commit
56a007dd32
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user