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,
boolean isIE8)
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, boolean isIE8) throws IOException
element - the element to retain in the screenshotfullScreen - the full screen imageisIE8 - true if the browser is IE8IOException - when the element is completely outside the screenshotpublic 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 © 2012-2025 Vaadin Ltd. All Rights Reserved.