manykarim / robotframework-doctestlibrary

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

Compare Images placeholder-file=.json #34

Closed extmme closed 2 years ago

extmme commented 2 years ago

Hello again, I was using your pdf and .json file for exploring and it work fine. And I am wondering how did you excatly create the .json file for you pdf? Does the pdf (sample_1_page.pdf) have identifed some structure which is not seen?

Me and my colleague have no idea how to exclude some area with .json in our PDF file. Can you give us an advice? :)

manykarim commented 2 years ago

Sure, no problem. The .json files were created manually.

The different mask types (area, coordinates, text patterns) are shown here: https://github.com/manykarim/robotframework-doctestlibrary/#areas-coordinates-text-patterns

There is also an explanation in my video: https://youtu.be/qmpwlQoJ-nE?t=421

Does that help?

manykarim commented 2 years ago

By the way: If you are wondering on how to get the correct coordinates of the coordinate placeholder:

Just open your document/image in Gimp. Draw a selection rectangle around the area you want to exclude. Write down the x/w/height/width information shown in Gimp for the selection

extmme commented 2 years ago

I did that. I found the areas via Gimp, the areas are hidden with .json (your sent json which I slightly redid) and it finnaly worked:) Great! Thanks!!!!

manykarim commented 2 years ago

Awesome, I just wanted to reply - but if you figured it out in the meantime: Even better!!

I think you need to watch out for the Units which you are using (px or mm) and also make the coordinates a little bit wider than the area to be hidden.

But good job that you figured it out yourself!