I am trying to capture a particular screen of my application and comparing it with the reference image to see if it has any differences (Pixel to Pixel image comparison). Is there any way to do so, by the way I also wanted to display both the reference image and the application image I am comparing it to be displayed in the log/report file. Can you help me in this.
you can try my library for visual comparisons.
It has plenty of features (as it also supports other documents like PDF) but basic screenshot comparisons will work as well
I’ve been using this library and it’s pretty interesting. As part of image comparison, I need to mask a specific region in my image (let’s say center of the image something like this
To use the ignore area in your json, you need to pass the path to that file as an argument placeholder_file
*** Settings ***
Library DocTest.VisualTest
*** Test Cases ***
Compare two Images and ignore parts by using masks
Compare Images Reference.jpg Candidate.jpg placeholder_file=masks.json
What your json file should do:
Create an rectangle ignore area at the position x=300 and y=290 px (counting from top left corner). The ignore area shall have a height of 270px and a width of 350px.
The ignore area will be shown as a blue box in the comparison screenshots.
What is the actual behavior or error that you are facing?
The things I see is that I had issues when values where not in “value” format, and I have an unit specified.
Note that Many’s library usually throw very readable errors (for example if json can’t be proceed).