Interface CanCompareScreenshots

All Known Subinterfaces:
TestBenchCommands
All Known Implementing Classes:
AccordionElement, AccordionPanelElement, AnchorElement, AppLayoutElement, AvatarElement, AvatarGroupElement, BigDecimalFieldElement, BoardElement, ButtonElement, ChartElement, CheckboxElement, CheckboxGroupElement, ComboBoxElement, ConfirmDialogElement, ContextMenuElement, CookieConsentElement, CrudElement, CustomFieldElement, DatePickerElement, DatePickerElement.MonthCalendarElement, DatePickerElement.OverlayContentElement, DatePickerElement.WeekdayElement, DateTimePickerElement, DescriptionListElement, DetailsElement, DialogElement, DivElement, DrawerToggleElement, EmailFieldElement, EmphasisElement, FormLayoutElement, GridElement, GridProElement, GridTHTDElement, GridTHTDElement, GridTRElement, GridTRElement, H1Element, H2Element, H3Element, H4Element, H5Element, H6Element, HorizontalLayoutElement, HrElement, IconElement, ImageElement, InputTextElement, IntegerFieldElement, LabelElement, ListBoxElement, ListItemElement, LoginFormElement, LoginOverlayElement, MenuBarElement, MessageElement, MessageInputElement, MessageListElement, MultiSelectComboBoxElement, NativeButtonElement, NativeDetailsElement, NotificationElement, NumberFieldElement, OrderedListElement, ParagraphElement, PasswordFieldElement, PreElement, ProgressBarElement, RadioButtonElement, RadioButtonGroupElement, RichTextEditorElement, RowElement, ScrollerElement, SelectElement, SelectElement, SelectElement.ItemElement, SpanElement, SplitLayoutElement, TabElement, TabsElement, TabSheetElement, TestBenchCommandExecutor, TestBenchElement, TextAreaElement, TextFieldElement, TimePickerElement, TimePickerElement.TimePickerComboBoxElement, TimePickerElement.TimePickerOverlayElement, TreeGridElement, UnorderedListElement, UploadElement, VerticalLayoutElement, VirtualListElement

public interface CanCompareScreenshots
  • Method Summary

    Modifier and Type
    Method
    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 Details

    • 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 image
      referenceName - 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