manykarim / robotframework-doctestlibrary

Robot Framework DocTest library. Simple Automated Visual Document Testing.
Apache License 2.0
46 stars 20 forks source link

Images are different but doctest says they are equal #18

Closed mydeveloperplanet closed 2 years ago

mydeveloperplanet commented 3 years ago

Two images are compared. The candidate image has some extra text. In the RF log it is shown that the images are different. However, DocTest says 'The compared images are equal' and the test passes. This only happens with this comparison, other comparisons we made had expected results.

In the attachment a test with images is available which reproduces this problem. If I can help one way or the other, please let me know.

doctest_issue.zip

manykarim commented 3 years ago

Can you please try the option ignore_watermarks=False as described here: https://github.com/manykarim/robotframework-doctestlibrary/issues/13#issuecomment-835470767

If the difference is located in the center of the picture and if it has a certain size, it will be considered as a watermark and ignored from comparison. I will disable that in the future, as it was specifically for a system in my company.

mydeveloperplanet commented 3 years ago

This worked. Thank you for your fast response, really appreciate this.

manykarim commented 2 years ago

You can install the next pre-release via the following command, in case you want to try it:

pip install --upgrade --pre robotframework-doctestlibrary

This strange watermark feature is disabled by default in the new release

manykarim commented 2 years ago

Fixed with 0.2.0 release

mydeveloperplanet commented 2 years ago

Sorry, was not able to test it before, but did so tonight. It works! Thank you :-)