PDF compare using robot

Hi Everyone.
I am new in Robot and want to ask if there is a possibility to compare 2 PDFs with robot framework. Is there any existing library for doing this?
Best Regards
Omar

Hi @omar1677,

There is a DocTest Library that can be used to compare pdf documents: GitHub - manykarim/robotframework-doctestlibrary: Robot Framework DocTest library. Simple Automated Visual Document Testing.

Here is the link to the keywords: https://manykarim.github.io/robotframework-doctestlibrary/PdfTest.html

Hope this helps.

3 Likes

Also check out the keywords for the visual comparison of PDF documents:
https://manykarim.github.io/robotframework-doctestlibrary/VisualTest.html

3 Likes

Thanks a lot for your answer. I will try it :wink:

Hi Again,
how can i install the library VisualTest ? robot show it red for me
BR
Omar

Many’s link points to: GitHub - manykarim/robotframework-doctestlibrary: Robot Framework DocTest library. Simple Automated Visual Document Testing.

On that page:

Installation instructions
pip install --upgrade robotframework-doctestlibrary

And example usage:

*** Settings *** 
Library   DocTest.VisualTest 
*** Test Cases *** 
Compare two Images and highlight differences 
  Compare Images   Reference.jpg   Candidate.jpg
1 Like

yes it works. Thanks a lot.
now i have another problem. The files must exists on windows but i want to compare files on Unix server. So after making an SSH connection, i go to a folder but robot can’t find the files i want to compare. any Idea how to solve this?
BR
Omar

You can use the ssh library to copy the files to a local directory first before comparing.
https://robotframework.org/SSHLibrary/SSHLibrary.html