|
版主songfun的一段代码,如下:
Dim qtApp ,pDefColl,pDef ,rtParams,rtParam
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.Open "C:\Test1"
Set pDefColl = qtApp.Test.ParameterDefinitions
cnt = pDefColl.Count
Indx = 1
While Indx <= cnt
Set pDef = pDefColl.Item(Indx)
Indx = Indx + 1
Wend
Set rtParams = pDefColl.GetParameters()
Set rtParam = rtParams.Item("InParam1")
rtParam.Value = "songfun"
qtApp.Test.Run , True, rtParams
MsgBox rtParams.Item("OutParam1").Value
为什么我运行VBScript脚本时,运行到 Set pDefColl = qtApp.Test.ParameterDefinitions 会报错“对象不支持此属性或方法”?
什么原因啊? |
|