public class ImageFileUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageFileUtil.ImageFileUtilImpl |
| Constructor and Description |
|---|
ImageFileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createScreenshotDirectoriesIfNeeded()
Creates all directories used to store screenshots unless they already
exist.
|
static File |
getErrorScreenshotFile(String errorImageFileName)
Returns an error screenshot
File instance with the given file
name within the error screenshot directory. |
static List<String> |
getReferenceImageFileNames(String referenceImageFileName,
org.openqa.selenium.Capabilities capabilities)
Returns the relative file names of reference images.
|
static File |
getReferenceScreenshotFile(String referenceImageFileName)
Returns a reference screenshot
File instance with the given file
name within the reference screenshot directory. |
static String |
getScreenshotErrorDirectory()
Returns the directory used for screenshot error images.
|
static String |
getScreenshotReferenceDirectory()
Returns the directory used for screenshot references.
|
static BufferedImage |
readReferenceImage(String referenceImageFileName)
Reads the given reference image into a BufferedImage
|
public static String getScreenshotReferenceDirectory()
public static String getScreenshotErrorDirectory()
public static void createScreenshotDirectoriesIfNeeded()
public static BufferedImage readReferenceImage(String referenceImageFileName) throws IOException
referenceImageFileName - image pathnameIOException - if an error occurs during reading the imagepublic static File getErrorScreenshotFile(String errorImageFileName)
File instance with the given file
name within the error screenshot directory. The file doesn't necessarily
exist yet in the file system after this method has been called.errorImageFileName - name of the error screenshotpublic static File getReferenceScreenshotFile(String referenceImageFileName)
File instance with the given file
name within the reference screenshot directory. The file doesn't
necessarily exist yet in the file system after this method has been
called.referenceImageFileName - name of the reference screenshotpublic static List<String> getReferenceImageFileNames(String referenceImageFileName, org.openqa.selenium.Capabilities capabilities)
getReferenceScreenshotFile(String).referenceImageFileName - name of the reference screenshotcapabilities - browser capabilitiesCopyright © 2012-2025 Vaadin Ltd. All Rights Reserved.