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
IOException
public static BufferedImage cropToElement(org.openqa.selenium.WebElement element, BufferedImage fullScreen) throws IOException
element
- the element to retain in the screenshotfullScreen
- the full screen imageIOException
public static boolean compareScreen(File reference, ImageComparison imageComparison, org.openqa.selenium.TakesScreenshot takesScreenshot, org.openqa.selenium.HasCapabilities driver) throws IOException
IOException
public static boolean compareScreen(BufferedImage reference, String referenceName, ImageComparison imageComparison, org.openqa.selenium.TakesScreenshot takesScreenshot, org.openqa.selenium.HasCapabilities driver) throws IOException
IOException
Copyright © 2019. All rights reserved.