Sub Main
51Testing软件测试网7J:j:W1yeK6P\6Ct c Dim Result As Integer
P,~lufXr0 Dim Result2 As Integer
;b/b"dyA0 Dim Result3 As Integer
51Testing软件测试网 tZ W}O#I dim yjk as integer
51Testing软件测试网}1[Lq8N`Bne dim i as double
51Testing软件测试网7zz{&P9m^8}*[c dim j as integer
51Testing软件测试网
T7Dt{ o@ R6k6v5A(?qN@0 i=111100000009669
51Testing软件测试网/YURv]&tkv 'Initially Recorded: 2005-11-28 14:44:08
k4Y1sZ I O0 'scrīpt Name: gdjh_wdfh
51Testing软件测试网w@$OkL(o for j=1 to 10000
51Testing软件测试网/C3k:aZo2L4_ U:\d Window SetContext, "Name=mainform", ""
pJ4a2NW'V0 InputKeys i & "{ENTER}"
51Testing软件测试网/\ ]v#A#EGxZh1G i=i-1
51Testing软件测试网l"Ts(b"z8rFu,F Result = SQAWaitForPropertyvalue("Caption=提示", "Enabled",TRUE, 6000)
51Testing软件测试网0a,nfD&O6YZ 51Testing软件测试网o#c.^?w}Ag[ msgbox Result
51Testing软件测试网;gek0\%_4Hs If Result <> sqaSuccess Then
51Testing软件测试网
_6Q$e e/XB PushButton Click, "Text=确定"
51Testing软件测试网fkP&z#f"B Result2 = SQAWaitForPropertyvalue("Caption=错误!", "Enabled",TRUE, 1000)
51Testing软件测试网 iSZ{L msgbox result
51Testing软件测试网x_l8Y2`t:ux PushButton Click, "Text=确定"
)k5@*EE1Rd)c'~&t[uy0 51Testing软件测试网0M*^3}rcza8\&c End if
51Testing软件测试网(d6HCJFD3w7Ie 'delayfor(5500)
51Testing软件测试网Fq#zsNKG&yls 51Testing软件测试网5l;T"Aq]Osj 'Window SetContext, "Name=mainform", ""
jg9t1T
fG0 'InputKeys "1{ENTER}2{ENTER}{NUM+}{NUM*}"
N%Gsh:mla-PR^V0 Window SetContext, "Name=mainform", ""
7^CFP`l] W0 InputKeys "1{ENTER}"
]|;]:J@sKW]0 51Testing软件测试网iw-s B8Y~"g Window SetContext, "Name=mainform", ""
51Testing软件测试网1f9I-s5t&D#r"{ETb InputKeys "2{ENTER}"
p4X{k~VU0 51Testing软件测试网 @:G"O$J(C:S(w Window SetContext, "Name=mainform", ""
&cv+x?7P[|9n$e d0 InputKeys "{NUM+}"
hn+_^$gH}+e0 51Testing软件测试网sS B9[@mT9L1ayK.SI*Y(|[(n0 51Testing软件测试网
r!^?'eS2ID Window SetTestContext, "Caption=错误!", ""
51Testing软件测试网#|y]vlf0s_Y yjk = SQAWaitForPropertyvalue("Caption=错误!", "Enabled",TRUE, 9000)
,Q eVqE0 '这里的返回值是1016,此窗口已经出现了,不是过vb的msgbox弹出的对话框。
51Testing软件测试网;AdGIz*DoW[ msgbox YJK
51Testing软件测试网N&C i
D"k Gw3f-e$dh0 51Testing软件测试网N
Xi${C}JA If yjk = sqaSuccess Then
51Testing软件测试网;f+EPM3C/~1EuS5f Window SetContext, "Caption=错误!", ""
D"`;H
\-Z"j#Y0 PushButton Click, "Text=确定"
nS8znX+] ee0 Window SetContext, "Name=mainform", ""
hB1BT!`K6\u
?
m0 InputKeys "{NUM*}"
%[Ul4O4fB$c~5?&lz0 Window SetContext, "Caption=提示信息", ""
51Testing软件测试网U2f1n]7K%x PushButton Click, "Text=否(N)"
Sy \6?m$D(a0 End if
Rs'} E}-^;s0 51Testing软件测试网#N1[Ajt"p:q.C+]4W
j Window SetContext, "Name=mainform", ""
s'a9J%Z1r\U;x0 InputKeys "{NUM*}"
51Testing软件测试网.P i2kbx{'cK5s%XC 51Testing软件测试网
R|KLu&W 'delayfor(9000)
!z0T0W/b+v0 Result3 = SQAWaitForPropertyvalue("Caption=提示", "Enabled",TRUE, 8000)
8i8Q)fetes*s(Q\0 'msgbox result3
l|a)`7s;E0 if Result3 <> sqaSuccess Then
(l8j$\3?ulv0 PushButton Click, "Text=是(Y)"
L9f$CTV!]+VZ*k0 End if
51Testing软件测试网!]b s3w/n.v
l5[ next j
a1l;IOl_OX n!m6N:s0 'msgbox result3
/fwd4DaR"gL?K"z\0End Sub
0@l:x3K4e0