zoukankan      html  css  js  c++  java
  • 编写一个脚本,用它来操纵QTP的运行

    下面内容拷贝自QTP的帮助文档
    Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
    Dim qtOptions 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
    Set qtApp = CreateObject("QuickTest.Application") ' Create a Application object

    ' Open the test
    qtApp.Open "C:\Tests\Test1", False ' Open a test named "Test1"
    qtApp.Test.Settings.Resources.DataTablePath = "e:\default.xls"     'add by me
    qtApp.Launch ' Start QuickTest
    qtApp.Visible = True ' Make the QuickTest application visible

    ' Run the test
    Set qtOptions = CreateObject("QuickTest.RunResultsOptions") ' Create a Results Option object
    qtOptions.ResultsLocation = "<TempLocation>" ' Set the Results location to temporary location
    qtApp.Test.Run qtOptions, True ' Run the test and wait for it to finish before continuing the automation script


    'qtApp.Test.Save

    ' Save the Run-time Data Table
    'qtApp.Test.LastRunResults.DataTable.Export "C:\Runtime.xls" ' Save the run-time Data Table to a file

    qtApp.Quit ' Exit QuickTest
    Set qtOptions = Nothing ' Release the Run Results Options object
    Set qtApp = Nothing ' Release the Application object


    至于该脚本的执行  可以用 dos命令下的   cscript  xyz.vbs  来实现
  • 相关阅读:
    RequireJS进阶(二)
    JavaScript判断元素为数字的奇异写法
    RequireJS进阶(三)
    RequireJS进阶(一)
    读Ext之十四(Ext元素)
    JavaScript中__proto__与prototype的关系
    工作流术语
    一个例子(Hello World)
    无题
    再谈调用子流程(1)
  • 原文地址:https://www.cnblogs.com/tester2test/p/412966.html
Copyright © 2011-2022 走看看