不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           it is no use doing what you like, you have got to like what you do.

SQAWaitForPropertyvalue 函数使用

上一篇 / 下一篇  2007-01-05 12:16:22 / 个人分类:Robot技术

Sub Main51Testing软件测试网7J:j:W1ye K6P\6Ct c
    Dim Result As Integer
P,~lufXr0    Dim Result2 As Integer
;b/b"dyA0    Dim Result3 As Integer51Testing软件测试网 tZ W}O#I
    dim yjk as integer51Testing软件测试网}1[Lq8N`Bne
    dim i as double51Testing软件测试网7zz{&P9m ^8}*[c
    dim j as integer51Testing软件测试网 T7Dt{ o@
   
R6k6v5A(?qN@0     i=11110000000966951Testing软件测试网/YURv]&tkv
    'Initially Recorded: 2005-11-28  14:44:08
k4Y1sZI O0    'scrīpt Name: gdjh_wdfh51Testing软件测试网w@$OkL(o
    for j=1 to 1000051Testing软件测试网/C3k:aZo2L4_U:\d
    Window SetContext, "Name=mainform", ""
p J4a2NW'V0    InputKeys  i & "{ENTER}"51Testing软件测试网/\ ]v#A#EGxZh1G
    i=i-151Testing软件测试网l"Ts(b"z8rFu,F
     Result = SQAWaitForPropertyvalue("Caption=提示", "Enabled",TRUE, 6000)51Testing软件测试网0a,nfD&O6YZ
  51Testing软件测试网o#c.^?w}Ag[
    msgbox Result51Testing软件测试网;gek0\%_4Hs
    If Result <> sqaSuccess Then51Testing软件测试网 _6Q$e e/XB
       PushButton Click, "Text=确定"51Testing软件测试网fkP&z#f"B
       Result2 = SQAWaitForPropertyvalue("Caption=错误!", "Enabled",TRUE, 1000)51Testing软件测试网 iSZ {L
       msgbox result51Testing软件测试网 x_l8Y2`t:ux
       PushButton Click, "Text=确定"
)k5@*EE1Rd)c'~&t[uy0     51Testing软件测试网0M*^3}rcza8\&c
    End if51Testing软件测试网(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%Gs h:mla-PR^V0    Window SetContext, "Name=mainform", ""
7^ CFP`l ] W0    InputKeys "1{ENTER}"
]|;]:J@ sKW]0  51Testing软件测试网iw-sB8Y~"g
    Window SetContext, "Name=mainform", ""51Testing软件测试网1f9I-s5t&D#r"{ETb
    InputKeys "2{ENTER}"
p4X{k~V U0       51Testing软件测试网 @:G"O$J(C:S(w
    Window SetContext, "Name=mainform", ""
&cv+x?7P[|9n$ed0    InputKeys "{NUM+}"
hn+_^$gH }+e0  51Testing软件测试网sSB9[@mT

9L1ay K.SI*Y(|[(n0  51Testing软件测试网 r!^?'eS2ID
     Window SetTestContext, "Caption=错误!", ""51Testing软件测试网#|y]v lf0s_Y
       yjk = SQAWaitForPropertyvalue("Caption=错误!", "Enabled",TRUE, 9000) 
,Q eVqE0                   '这里的返回值是1016,此窗口已经出现了,不是过vb的msgbox弹出的对话框。51Testing软件测试网;AdG Iz*DoW[
    msgbox YJK51Testing软件测试网N&C i D"k
  
G w3f-e$dh0  51Testing软件测试网N Xi${C}JA
    If yjk = sqaSuccess Then51Testing软件测试网;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)"
S y \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|KL u&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 if51Testing软件测试网!]b s3w/n.v l5[
    next j
a1l;IOl_OX n!m6N:s0    'msgbox result3
/fwd4DaR"gL? K"z \0End Sub
0@l:x3K4e0

TAG: 软件测试技术 Robot技术

 

评分:0

我来说两句

Open Toolbar