com.applitools.eyes.FileDebugScreenshotsProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-sdk-core-java3-jersey2x Show documentation
Show all versions of eyes-sdk-core-java3-jersey2x Show documentation
Applitools Eyes SDK base for Java
package com.applitools.eyes;
import com.applitools.utils.ImageUtils;
import java.awt.image.BufferedImage;
import java.util.Calendar;
/**
* A debug screenshot provider for saving screenshots to file.
*/
public class FileDebugScreenshotsProvider extends DebugScreenshotsProvider {
@Override
public void save(BufferedImage image, String suffix) {
String filename = getPath() + getPrefix() + Calendar.getInstance().getTimeInMillis() + "_" + suffix + ".png";
ImageUtils.saveImage(image, filename.replace(" ", "_"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy