Header Ads

How To Use Comments in QTP

image credit www.atoztoa.com
Comments are integral part of code development. Comments can make scripts more understandable,more readable. This also make debug easy. We can make some code to run and ome code remains unexecuted. If you rae using static testing,this feature is your friend.

Syntax

Rem comment (After the Rem keyword, a space is required before comment.)

Rem Windows("xyz").FlyCombo("abc").getValue() 

Or

Apostrophe (') symbol before the comment
' Windows("xyz").FlyCombo("abc").getValue() 
Comment/Uncomment a block of statements

    Select block of statement and use short cut key Ctrl + M (for comment)
    Select comment block and use short cut key Ctrl + Shift + M (for uncomment)
Powered by Blogger.