【问题标题】:How to click any button using vbscript如何使用 vbscript 单击任何按钮
【发布时间】:2015-09-28 05:52:28
【问题描述】:

我需要使用 vbscipt 启动 qtp.exe 应用程序,但我不明白如何单击某个按钮以及如何使用 vbscript 打开特定的测试文件。

请给我一些提示或想法。

【问题讨论】:

    标签: vbscript automated-tests qtp


    【解决方案1】:

    您可以通过创建 QTP 的 COM 对象轻松完成。

    Dim QTPObj,QTPTest
    Set QTPObj=CreateObject("QuickTest.Application")
    
    'Check if the application is not already Launched
    If Not QTPObj.Launched then
    QTPObj.Launch
    end if
    
    QTPObj.Visible=True
    QTPObj.Open "D:\MyQTPTests\Test1001 1001" 'name of the start up script
    Set QTPTest=QTPObj.Test
    QTPTest.Run 'Run the Test
    QTPTest.Close 'Close the Test
    QTPObj.Quit 'Quit the QTP Application
    

    【讨论】:

      猜你喜欢
      • 2012-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-20
      • 1970-01-01
      • 1970-01-01
      • 2023-02-17
      相关资源
      最近更新 更多