public class ScreenshotComparator extends Object
| Constructor and Description |
|---|
ScreenshotComparator() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
compareScreen(BufferedImage reference,
String referenceName,
ImageComparison imageComparison,
org.openqa.selenium.TakesScreenshot takesScreenshot,
org.openqa.selenium.HasCapabilities driver) |
static boolean |
compareScreen(File reference,
ImageComparison imageComparison,
org.openqa.selenium.TakesScreenshot takesScreenshot,
org.openqa.selenium.HasCapabilities driver) |
static boolean |
compareScreen(String referenceId,
ReferenceNameGenerator referenceNameGenerator,
ImageComparison imageComparison,
org.openqa.selenium.TakesScreenshot takesScreenshot,
org.openqa.selenium.HasCapabilities driver) |
static BufferedImage |
cropToElement(org.openqa.selenium.WebElement element,
BufferedImage fullScreen)
Crops the image to show only the element.
|
public static boolean compareScreen(String referenceId, ReferenceNameGenerator referenceNameGenerator, ImageComparison imageComparison, org.openqa.selenium.TakesScreenshot takesScreenshot, org.openqa.selenium.HasCapabilities driver) throws IOException
IOExceptionpublic static BufferedImage cropToElement(org.openqa.selenium.WebElement element, BufferedImage fullScreen) throws IOException
element - the element to retain in the screenshotfullScreen - the full screen imageIOExceptionpublic static boolean compareScreen(File reference, ImageComparison imageComparison, org.openqa.selenium.TakesScreenshot takesScreenshot, org.openqa.selenium.HasCapabilities driver) throws IOException
IOExceptionpublic static boolean compareScreen(BufferedImage reference, String referenceName, ImageComparison imageComparison, org.openqa.selenium.TakesScreenshot takesScreenshot, org.openqa.selenium.HasCapabilities driver) throws IOException
IOExceptionCopyright © 2018. All rights reserved.