HP QTP: How to perform validation on pdf opened in IE (1301 Views)
Reply
Advisor
RicoLee
Posts: 35
Registered: ‎05-09-2013
Message 1 of 3 (1,301 Views)

HP QTP: How to perform validation on pdf opened in IE

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.

.-asd-.
HP Expert
Ana_Noncheva
Posts: 245
Registered: ‎08-06-2013
Message 2 of 3 (1,281 Views)

Re: HP QTP: How to perform validation on pdf opened in IE

Hello,

 

QTP 9.2 - 11 does not have special support for PDF, but here are some workarounds with example code:

(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.

 

Regards,

Ana

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
Frequent Advisor
Jeffery_QA
Posts: 54
Registered: ‎09-16-2013
Message 3 of 3 (1,274 Views)

Re: HP QTP: How to perform validation on pdf opened in IE

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.

 

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.