我要编一个.VBS文件通过Windows的任务计划来定时启动QuickTest Professional的批量运行工具(Multi Test Manager)。但是遇到很多问题!
我在网上抄了一段代码
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 "C:\QTP脚本", True
' set run settings for the test
Set qtTest = qtApp.Test
qtTest.Settings.Run.OnError = "NextStep"
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation = "C:/"
qtTest.Run
'qtTest.Close ' Close the test
Set qtResultsOpt = Nothing
Set qtTest = Nothing
Set qtApp = Nothing
现在想参照这段代码,改成调用Multi Test Manager工具。于是我将代码中的QuickTest.Application改成MultiTestManager.Application但是运行后从第五行往后多出提示“对象不支持此属性或方法”
[解决办法]
经过尝试,自己解决了
Dim MTMApp
Set MTMApp = CreateObject("MultiTestManager.Application")
MTMApp.visible = true
MTMApp.Load "G:\我的文档\11.mtm"
MTMApp.Run
set MTMApp=Nothing
看来学习写代码,不是简单的依样画葫芦!
[解决办法]
帮顶
[解决办法]
mark
[解决办法]
该回复于2009-03-17 09:13:44被版主删除
[解决办法]
danke~~~正在学习中