com.vaadin.testbench.screenshot.
Class ImageFileUtil.ImageFileUtilImpl
- java.lang.Object
-
- com.vaadin.testbench.screenshot.ImageFileUtil.ImageFileUtilImpl
-
Enclosing class:
public static class ImageFileUtil.ImageFileUtilImpl extends Object
-
-
Constructor Summary
Constructors Constructor and Description ImageFileUtilImpl()
-
Method Summary
All Methods Modifier and Type Method and Description void
createScreenshotDirectoriesIfNeeded()
Creates all directories used to store screenshots unless they already exist.
File
getErrorScreenshotFile(String errorImageFileName)
List<String>
getReferenceImageFileNames(String referenceImageFileName, org.openqa.selenium.Capabilities capabilities)
Returns the relative file names of reference images.
File
getReferenceScreenshotFile(String referenceImageFileName)
String
getScreenshotErrorDirectory()
Returns the directory used for screenshot error images.
String
getScreenshotReferenceDirectory()
Returns the directory used for screenshot references.
BufferedImage
readReferenceImage(String referenceImageFileName)
Reads the given reference image into a BufferedImage
-
-
-
Method Detail
-
getScreenshotReferenceDirectory
public String getScreenshotReferenceDirectory()
Returns the directory used for screenshot references.
Returns:
The screenshot reference directory, ending in a slash.
-
getScreenshotErrorDirectory
public String getScreenshotErrorDirectory()
Returns the directory used for screenshot error images.
Returns:
The screenshot error directory, ending in a slash.
-
createScreenshotDirectoriesIfNeeded
public void createScreenshotDirectoriesIfNeeded()
Creates all directories used to store screenshots unless they already exist.
-
readReferenceImage
public BufferedImage readReferenceImage(String referenceImageFileName) throws IOException
Reads the given reference image into a BufferedImage
Parameters:
referenceImageFileName
-Returns:
Throws:
-
getReferenceImageFileNames
public List<String> getReferenceImageFileNames(String referenceImageFileName, org.openqa.selenium.Capabilities capabilities)
Returns the relative file names of reference images. The actual image file for a relative file name can be retrieved with
getReferenceScreenshotFile(String)
.Parameters:
referenceImageFileName
-capabilities
-Returns:
file names of reference images
-
-