【问题标题】:QTP/UFT - Adding comments to code in Editor viewQTP/UFT - 在编辑器视图中向代码添加注释
【发布时间】:2013-11-07 13:31:56
【问题描述】:

如何通过编辑器视图在我的代码中为我的操作添加 cmets?我知道这是一个简单的问题,但我无法弄清楚,这在 Google 看来几乎是不可能的。

我尝试了一些标准的评论类型,但都没有奏效:

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

我知道我可以将文本添加到 Action 的 Description 属性中,但我希望能够根据需要注释掉代码中的特定行。

【问题讨论】:

    标签: comments qtp hp-uft


    【解决方案1】:

    您是指查看生成代码的专家视图吗?
    您可以为此使用单引号字符:

    ' 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-22
      • 1970-01-01
      • 2012-10-07
      • 2013-08-13
      • 1970-01-01
      • 2023-02-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多