Dim qtApp
Dim qtTest
Dim qtResultsOpt
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
'Set QuickTest run options
qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Open "F:\脚本及程序\qtp脚本\ZYZL", True
'set run settings for the test
Set qtTest = qtApp.Test
qtTest.Settings.Run.OnError = "NextStep"
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "F:\自动化测试结果"
qtTest.Run
'qtTest.Close ' Close the test
Set qtResultsOpt = Nothing
Set qtTest = Nothing
Set qtApp = Nothing作者: cellule 时间: 2012-12-10 10:58
qtApp.Open "F:\脚本及程序\qtp脚本\ZYZL", True 这个是不是要添加文件类型的?作者: joe_deng 时间: 2012-12-10 17:08
建议先启动QTP检查下Results Location选项的按钮是否选择的是New run results folder。如果不是,选择该项再试试