Skip to content

Commit 8a66a1a

Browse files
committed
Remove background color overriding
1 parent 1363404 commit 8a66a1a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/aquality/selenium/core/visualization/ImageFunctions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static BufferedImage resize(Image image, int width, int height) {
117117
}
118118

119119
/**
120-
* Redraw the image on white background and saves it to target file.
120+
* Redraw the image and saves it to target file.
121121
* @param image source image.
122122
* @param file target file.
123123
* @param format target format.
@@ -126,7 +126,7 @@ public static void save(Image image, File file, String format) throws IOExceptio
126126
if (file.exists() || file.createNewFile()) {
127127
BufferedImage newImage = new BufferedImage(image.getWidth(null), image.getHeight(null), TYPE_INT_RGB);
128128
Graphics2D graphics = newImage.createGraphics();
129-
graphics.drawImage(image, 0, 0, Color.WHITE, null);
129+
graphics.drawImage(image, 0, 0, null);
130130
graphics.dispose();
131131
ImageIO.write(newImage, format, file);
132132
}

src/test/java/tests/applications/browser/ChromeApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class ChromeApplication implements IApplication {
1212
private final RemoteWebDriver driver;
1313

1414
ChromeApplication(long implicitWaitSeconds) {
15-
driver = new ChromeDriver(new ChromeOptions().addArguments("--headless"));
15+
driver = new ChromeDriver(new ChromeOptions().addArguments("--headless").addArguments("--remote-allow-origins=*"));
1616
setImplicitWaitTimeout(Duration.ofSeconds(implicitWaitSeconds));
1717
}
1818

0 commit comments

Comments
 (0)