|
2#
楼主 |
发表于 2011-8-12 16:14:31
|
只看该作者
SystemUtil.Run "flight4a.exe","","D:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dim username(3)
username(0) = "user"
username(1) = "user1"
username(2) = "user2"
For i=0 to 2
Dim myDesc
Set myDesc=Description.Create()
myDesc("Class Name").Value = "Dialog"
myDesc("regexpwndtitle").Value = "Login"
Dim desc_test
Set desc_test=Description.Create()
desc_test("Class Name").Value="WinEdit"
desc_test("text").value=""
desc_test("attached text").Value="Agent Name:"
set bb = desktop.ChildObjects(desc_test)
Msgbox bb.count
desc_test("text").Value=username(i)
Dialog(myDesc).WinEdit(desc_test)
Dialog(myDesc).WinEdit("Attached text:=Password:").Set "mercury"
Dialog(myDesc).WinButton("text:=Cancel").Click
Next
图片有点暗,添上代码部分 |
|