Package com.vaadin.testbench.commands
Interface CanCompareScreenshots
-
- All Known Subinterfaces:
TestBenchCommands
- All Known Implementing Classes:
TestBenchCommandExecutor,TestBenchElement
public interface CanCompareScreenshots
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancompareScreen(BufferedImage reference, String referenceName)Tests that a screen shot is equal to the specified reference image.booleancompareScreen(File reference)Tests that a screen shot is equal to the specified reference image.booleancompareScreen(String referenceId)Tests that a screen shot is equal to the specified reference image.
-
-
-
Method Detail
-
compareScreen
boolean compareScreen(String referenceId) throws IOException
Tests that a screen shot is equal to the specified reference image. The comparison tolerance can be specified by setting the com.vaadin.testbench.block.error system property to a value between 0 and 1, where 0 == no changes are accepted and 1 == big changes are accepted. Note that specifying 1 doesn't mean that any reference image is accepted.- Parameters:
referenceId- the ID of the reference image- Returns:
- true if the screenshot is considered equal to the reference image, false otherwise.
- Throws:
IOException- if there was a problem accessing the reference image
-
compareScreen
boolean compareScreen(File reference) throws IOException
Tests that a screen shot is equal to the specified reference image. The comparison tolerance can be specified by setting the com.vaadin.testbench.block.error system property to a value between 0 and 1, where 0 == no changes are accepted and 1 == all changes are accepted.- Parameters:
reference- the reference image file- Returns:
- true if the screenshot is considered equal to the reference image, false otherwise.
- Throws:
IOException- if there was a problem accessing the reference image
-
compareScreen
boolean compareScreen(BufferedImage reference, String referenceName) throws IOException
Tests that a screen shot is equal to the specified reference image. The comparison tolerance can be specified by setting the com.vaadin.testbench.block.error system property to a value between 0 and 1, where 0 == no changes are accepted and 1 == all changes are accepted.- Parameters:
reference- the reference imagereferenceName- the filename of the reference image. Used when writing the error files.- Returns:
- true if the screenshot is considered equal to the reference image, false otherwise.
- Throws:
IOException- if there was a problem accessing the reference image
-
-