Interface CanCompareScreenshots

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