摘自:51Testing,作者songfun,http://bbs.51testing.com/viewthread.php?tid=76226
SystemUtil.CloseProcessByName
"
Flight4a.exe
"
SystemUtil.Run Environment.Value(
"
ProductDir
"
)
&
"/
samples/flightapp/flight4a.exe
"
Dialog(
"
Login
"
).WinEdit(
"
Agent Name:
"
).Set Parameter(
"
InAction1
"
)
Dialog(
"
Login
"
).WinEdit(
"
Password:
"
).SetSecure
"
46f1f4259cf01348f5a4c630bcee96084f3d1619
"
Dialog(
"
Login
"
).WinButton(
"
OK
"
).Click
Window(
"
Flight Reservation
"
).Close
Parameter(
"
OutAction1
"
)
=
true
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
1万+



被折叠的 条评论
为什么被折叠?



