2013-10-28 36 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