com.vaadin.testbench.commands.
Interface CanCompareScreenshots
-
All Known Subinterfaces:
All Known Implementing Classes:
AnchorElement, AppLayoutElement, AppLayoutMenuElement, BoardElement, ButtonElement, ChartElement, CheckboxElement, ComboBoxElement, ConfirmDialogElement, CookieConsentElement, CrudElement, DatePickerElement, DescriptionListElement, DialogElement, DivElement, EmphasisElement, FormLayoutElement, GridElement, GridTHTDElement, GridTRElement, H1Element, H2Element, H3Element, H4Element, H5Element, H6Element, HorizontalLayoutElement, HrElement, ImageElement, InputTextElement, IronListElement, LabelElement, ListItemElement, MenuItemElement, NativeButtonElement, NotificationElement, OrderedListElement, ParagraphElement, PasswordFieldElement, ProgressBarElement, RadioButtonElement, RadioButtonGroupElement, RowElement, SelectElement, SpanElement, SplitLayoutElement, TabElement, TabsElement, TestBenchCommandExecutor, TestBenchElement, TextAreaElement, TextFieldElement, UnorderedListElement, UploadElement, VerticalLayoutElement
public interface CanCompareScreenshots
-
-
Method Summary
All Methods Modifier and Type Method and Description boolean
compareScreen(BufferedImage reference, String referenceName)
Tests that a screen shot is equal to the specified reference image.
boolean
compareScreen(File reference)
Tests that a screen shot is equal to the specified reference image.
boolean
compareScreen(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 imageReturns:
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 fileReturns:
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
-
-