How To Use Comments in QTP

September 29, 2010

image credit
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.


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

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


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)

You Might Also Like