标题: VBS中能否使用RunAction呢? [打印本页] 作者: zte_boy 时间: 2008-4-8 14:24 标题: VBS中能否使用RunAction呢? VBS中能否使用RunAction呢?作者: 今天有雾 时间: 2008-4-8 14:25
我没有试过,不过想来应该是可以的作者: hsjzfling 时间: 2008-4-8 14:32
可以写在vbs中,但是必须通过QTP来执行~~作者: getfly 时间: 2008-4-8 16:08
同意三楼的作者: zte_boy 时间: 2008-4-8 17:08
可我怎么也调不成功,我调的是另外一个TEST中的Action作者: hanliu 时间: 2008-7-7 17:08 标题: VBS启动并运行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 "E:\自动化测试工程\调用", 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