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

测试CQ 登陆

上一篇 / 下一篇  2007-02-10 14:56:07 / 个人分类:Robot技术

'$include "sqautil.sbh"51Testing软件测试网a,\ }\-Yu\
Sub Main51Testing软件测试网re,OO%P6B
    Dim Result As Integer
;M9bW8s7D#XA,Z0    dim x as integer51Testing软件测试网HW2{AA^\;h
    dim dp as long
"ce,KRB0    dim dpname as string
#s2u&q ?XO,o/i0    dim password as string
x F9Y9dN.`3?.tN0
3y)chl6dGQJ%O hR0    StartApplication """D:\Program Files\Rational\ClearQuest\clearquest.exe"""51Testing软件测试网4A^uZ ^
    dp = sqadatapoolopen("test-cq")
G;~hw+S5Ru:h0    for x=1 to 2
f4}h+j d0p0    call sqadatapoolfetch(dp)51Testing软件测试网y.p#?#P#F.r;vb:P
    call sqadatapoolvalue(dp,1,dpname)
wNNV nF$F0    call sqadatapoolvalue(dp,2,password)51Testing软件测试网kxmI gn
    call sqadatapoolvalue(dp,3,cctype)
A)Q5s'`*t9k!W7m&M0    Window SetContext, "Caption=Rational ClearQuest Login", ""51Testing软件测试网7b7|AJ0A Tf*c\
    EditBox DblClick, "Label=User Name", "Coords=10,6"51Testing软件测试网Xqg-iY8a.h X*A
    msgbox dpname
jo0YZ6m*]#E0    InputKeys dpname
sY E-Xx Qcj T0    EditBox DblClick, "Label=Password", "Coords=5,10"51Testing软件测试网`!KeK x }E lN Y
    msgbox password
t.Z+N9z ^j0    InputKeys password
N C-k*S1y]0    ComboBox Click, "Label=Database", "Coords=153,12"  
N3\ }-Ktx{&^A0    ComboListBox Click, "Label=Database", "Text=RSDF : "
t*cv Y9o4_0@t3U0    PushButton Click, "Text=OK"
E[(`+p%u8h0  51Testing软件测试网H i&N c&M"b#^+k
   result=SQAWaitForObject("\;Type=Window;Caption=Warning - Invalid Login",8000)
x] WP_'~]0   MSGBOX result
v6gz1|qe)J0   //x=1返回0 x=2 返回1016 --1016是指在指定的时间内没有找到对象
!Mmpz(Y jQ4mBv E0   result=SQAFindObject("\;Type=Window;Caption=Warning - Invalid Login")51Testing软件测试网 ZW0N&j!pu+y*H
   msgbox result 51Testing软件测试网*J RO7MS;qw-O
   //x=1返回0 x=2 返回1003
5AK([9[&H q0      if result=sqasuccess then  51Testing软件测试网'H/WE3I](@]-v_A
        msgbox "fail"
~iCH-Xh&M0        Window SetContext, "Caption=Warning - Invalid Login", ""
{'S3nRW3_0        PushButton Click, "Text=OK" 51Testing软件测试网4X|{p*D%@
     else 
^s2aA,H1?V0        msgbox "ok"
Zj:dC)yI0        Window SetContext, "Caption=Rational ClearQuest - RSDF :", ""
EhDq]P1b0dN(L0        Window CloseWin, "", ""
0\4^Ufk;fS0    end if
"XU$W5?m/S0    next x
t?+dtEo0End Sub51Testing软件测试网5O1qT!aRVh["b U
 51Testing软件测试网,a|u@7gd+a
有待完善..............
kH+b3N@ZD X(M0

TAG: Robot技术

 

评分:0

我来说两句

Open Toolbar