Package com.vaadin.testbench.commands
Interface CanCompareScreenshots
- All Known Subinterfaces:
TestBenchCommands
- All Known Implementing Classes:
AccordionElement,AccordionPanelElement,AnchorElement,AppLayoutElement,AvatarElement,AvatarGroupElement,BigDecimalFieldElement,BoardElement,ButtonElement,CardElement,ChartElement,CheckboxElement,CheckboxGroupElement,ComboBoxElement,ConfirmDialogElement,ContextMenuElement,CookieConsentElement,CrudElement,CustomFieldElement,DashboardElement,DashboardSectionElement,DashboardWidgetElement,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,NativeLabelElement,NativeTableBodyElement,NativeTableCaptionElement,NativeTableCellElement,NativeTableElement,NativeTableFooterElement,NativeTableHeaderCellElement,NativeTableHeaderElement,NativeTableRowElement,NotificationElement,NumberFieldElement,OrderedListElement,ParagraphElement,PasswordFieldElement,PopoverElement,PreElement,ProgressBarElement,RadioButtonElement,RadioButtonGroupElement,RangeInputElement,RichTextEditorElement,RowElement,ScrollerElement,SelectElement,SelectElement,SelectElement.ItemElement,SideNavElement,SideNavItemElement,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 TypeMethodDescriptionbooleancompareScreen(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 Details
-
compareScreen
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
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
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
-