2013-10-28 108 views
-2

如何通过我的操作的编辑器视图在我的代码中添加注释?我知道这是一个简单的问题,但我一直无法弄清楚,而这对Google来说似乎几乎是不可能的。QTP/UFT - 在编辑器视图中向代码添加注释

我已经尝试了一些标准的注释类型的,没有一个是有工作:

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

我知道我可以添加文本到一个Action的Description属性,但我会喜欢能够根据需要在我的代码中注释特定的行。

回答

6

您的意思是您看到生成的代码的专家视图?
您可以使用单引号字符为:

' 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 

快捷评论/取消注释块:按Ctrl + M和按Ctrl + Shift + M