QTP/UFT - Adding comments to code in Editor view

0
0

How do I add comments in my code via the Editor view for my Actions? I know this is a simple question, but I haven’t been able to figure it out, and this seems almost impossible to Google for.

I’ve tried some of the standard commenting types, none of which have worked:

  • //
  • /* */
  • #
  • --

I know I can add text to the Description attribute for an Action, but I’d like to be able to comment out specific lines in my code as needed.

  • You must to post comments
0
0

Do you mean the expert view where you see the generated code?

You can use the single quote character for that:

' The user needs to be informed that the test is ready to run, so 
' he can take appropriate actions before continue or Cancel if needed.
If MsgBox("The test is ready to start.", VbOKCancel) <> VbOK then
ExitTest
End If

Shortcut to comment/uncomment blocks: Ctrl+M and Ctrl+Shift+M

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website