12-03-2013 01:52 AM
Greetings, I would like to know if there is a way to perform validation for pdf that is opened by IE. I have tried checkpoints, QTP recognize it as activeX WinObject but unable to perform validation. Please advice.
12-03-2013 06:01 AM
QTP 9.2 - 11 does not have special support for PDF, but here are some workarounds with example code:
- How to find a text in a pdf: http://support.openview.hp.com/selfsolve/document/
- How to capture text from a pdf: http://support.openview.hp.com/selfsolve/document/
- Using Acrobat pdf API: http://support.openview.hp.com/selfsolve/document/
(Let me know if you cannot view the documents)
Sarting with UFT 11.5*, you can use the File Content Checkpoint to compare the textual content of a file that is generated during a run session with the textual content of a source file.
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
12-03-2013 08:46 AM
By using 11.52 you will be able to check the text content of PDF document, but you need get the PDF ready for test first. If it is opened by IE, you have to first save the pdf on your local drive. And then use the saving path in the pdf checkpoint for the compared document location.
If so, another question is how to save that if the pdf will only be recognized as on ActiveX object. My solution is mouse movement command, since pdf format itself is not a defined object in QTP by now, you have to use the common action like mouse and keyboard which don't rely on any object type.
If my post helps to resolve your issue or query, please accept this as solution and give KUDOS on this page.