All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.applitools.eyes.FileDebugScreenshotsProvider Maven / Gradle / Ivy

There is a newer version: 3.11
Show newest version
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