tlalok
15 years agoContributor
How to call Beyond Compare from script to compare PDF files
Hi,
I have a test that has to compare pdf files. After some playing with "File Checkpoint" I came to the conclusion, that the PDFs are never binary the same so the "File Checkpoint" will always fail.
I also checked FAQ: Q.:
Can I use TestComplete to compare PDF files?
(http://www.automatedqa.com/support/viewarticle.aspx?aid=8859&hlite=pdf;compare).
However, the answer does not really help me.
Then I ran over beyond compare and found out that it supports a "rule based" comparison that ignores byte differences but checks if the content is the same. In the gui, I could successfully compare my pdfs as "rule based equal".
So, now my question for TestComplete:
I created a script function that uses Win32API.WinExec( "[... whole command line]") and it seems to be doing something, but WinExec does not return the result from beyond compare (I expect "3"), but something bigger than 32.
So, how can I call an external process from script and do something with the exist code the process returns?
I'm working with Delphi Script.
Thanks for any help on this.
Regards,
-Carsten
I have a test that has to compare pdf files. After some playing with "File Checkpoint" I came to the conclusion, that the PDFs are never binary the same so the "File Checkpoint" will always fail.
I also checked FAQ: Q.:
Can I use TestComplete to compare PDF files?
(http://www.automatedqa.com/support/viewarticle.aspx?aid=8859&hlite=pdf;compare).
However, the answer does not really help me.
Then I ran over beyond compare and found out that it supports a "rule based" comparison that ignores byte differences but checks if the content is the same. In the gui, I could successfully compare my pdfs as "rule based equal".
So, now my question for TestComplete:
I created a script function that uses Win32API.WinExec( "[... whole command line]") and it seems to be doing something, but WinExec does not return the result from beyond compare (I expect "3"), but something bigger than 32.
So, how can I call an external process from script and do something with the exist code the process returns?
I'm working with Delphi Script.
Thanks for any help on this.
Regards,
-Carsten