0

I have a simple solution to compare two images (two screenshots of Chrome browser). To get an image I use AShoot library. To compare two images I use ImageMagic tool.

public Screenshot takeScreenshot() {
        Screenshot elementScreenShot = new AShot()
                .shootingStrategy(ShootingStrategies.viewportPasting(100))
                .takeScreenshot(DriverManager.getWebDriver());

        return elementScreenShot;
    }

I use ImageMagic to compare base image with new one - actual. But very often I getting an error. Everything is ok but the problem is with corners of fields.

Example: Actual:

enter image description here

Expected:

enter image description here

Result (ImageMagic compare result):

enter image description here

As you can see, the problem is with few pixels in the corner of the field. I tried many tricks but nothing happens.

Saganowsky
  • 103
  • 1
  • 10

1 Answers1

0

I observe that issues occur only on the Chrome browser. On Mozilla everything it's OK. It seems that there is a problem in rendering our application in the Chrome browser. For 10 executions of this same site, 7/10 have differences in field corners.

Saganowsky
  • 103
  • 1
  • 10