http://quicktesthp.blogspot.com

QTP VBScript new series + Interview Question Bank on QTP for enrichment of Knowledge in QTP

This Site has been brought to you by HP Certified Expert of QTP.

Exciting new articles for October:

1) QTP Tip:Deselect all Radio Buttons

2) HP QTP Crypt Object

3)Adding Hyperlinks in Excel Spreadsheet

Best of Luck Friends ! ! !

Expert QTP
expert.qtp@gmail.com

All Articles are Copyright Protected. These are Free for Reading & Personal Use. Reproduction in Any Form without the Permission is Illegal & Strictly Prohibited.

Copyright © 2009 ExpertQTP

Google Search

Wednesday, December 3, 2008

Run time Debugging through Print utility statement in QTP

I believe you have used "msgbox" function almost every time for debugging purposes i.e. displaying some text at run time. But the problem with "msgbox" function is that it keeps open till you close it and moreover you can’t debug further, since it’s a modal dialog box. You have to press OK button to move ahead.

How about a similar utility function, which works very similar, like "msgbox" and also provides the user the flexibility to perform further debugging?


Yes, it is possible. HP Quicktest Professional (QTP) provides a Print utility statement which is used to display information in the "QuickTest Print Log" window while still continuing your Run Session.


Looks pretty interesting!!!!!!! Alright, then go ahead and read more.

Firstly let us see what happens in case of "msgbox" function. As soon as the script encounters the "msgbox" function, it displays a dialog box and the script gets paused till the user presses the OK button.


Following screenshot demonstrate the concept.
Here you need to press the OK button in order to continue.

In order to counter this problem, HP QTP also provides a fantastic Print utility which is very similar to its "msgbox" counterpart but much more flexible. It can be used for debugging purposes. It is very simple to use inside QTP tool.

Following screenshot demonstrate the concept.


As you can see from this screenshot, QuickTest Print Log window remains open even after your script has finished running, thus providing more flexibility.

So from now on which one you would like to use? QTP’s "msgbox" function or QTP’s Print Utility Statement?

Did you like my explanation of the concept in the above article?

Being Technology Savvy, I am sure you must be curious to read many more interesting articles on QTP; How about subscribing to my Feed? This will help you in automatically knowing the moment I post an article on my Site.

So let us join and let us Learn & Master the great Tool QTP.

Keywords: HP QTP, Quicktest Professional, QTP Blog, QTP msgbox function, QTP Print utility statement





Read more...


 
Copyright © 2009 ExpertQTP