不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           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"
~q5H*zR&aZ0Sub Main51Testing软件测试网N-p$r%snf:s3D9^
    Dim Result As Integer
]QlC{,?Ii7{0    dim x as integer
){7w"W0C{dTkG0    dim dp as long51Testing软件测试网 r z{dfL.G&V
    dim dpname as string51Testing软件测试网.V&RYG+V
    dim password as string51Testing软件测试网x:|4Q(E"gh }
51Testing软件测试网!vI-X)L-~lKQb p
    StartApplication """D:\Program Files\Rational\ClearQuest\clearquest.exe"""51Testing软件测试网5@eVX4Cc#h#\
    dp = sqadatapoolopen("test-cq")51Testing软件测试网)[-X]S1[v%sY%~6r~z
    for x=1 to 251Testing软件测试网;Cnj&dayt!A
    call sqadatapoolfetch(dp)51Testing软件测试网-Kzw7{1t OK#A:Sr
    call sqadatapoolvalue(dp,1,dpname)
zT5@p:kd0    call sqadatapoolvalue(dp,2,password)51Testing软件测试网3G N.A%z$^h3k;A/z6oe
    call sqadatapoolvalue(dp,3,cctype)51Testing软件测试网$u})fg%l r7Uj,DQ
    Window SetContext, "Caption=Rational ClearQuest Login", ""
N b.Aj8Z#{K0    EditBox DblClick, "Label=User Name", "Coords=10,6"51Testing软件测试网tZ$s`%|i
    msgbox dpname
|)j&`d-t0C\C1L0    InputKeys dpname51Testing软件测试网4[%l;d P [e'_
    EditBox DblClick, "Label=Password", "Coords=5,10"
7d#L;Ny/};y q3i0    msgbox password51Testing软件测试网;hc/\U Kr+Q
    InputKeys password
7`P m L&bIp0    ComboBox Click, "Label=Database", "Coords=153,12"  51Testing软件测试网IQJT,g}-A `
    ComboListBox Click, "Label=Database", "Text=RSDF : "
K2}pk5gi6O'k0    PushButton Click, "Text=OK"51Testing软件测试网!vj$Q,vm6i0d
 
}vFO ^(|0   result=SQAWaitForObject("\;Type=Window;Caption=Warning - Invalid Login",8000)51Testing软件测试网9{d#`|u4_TQ
   MSGBOX result
5A:U;w TvZ0   //x=1返回0 x=2 返回1016 --1016是指在指定的时间内没有找到对象51Testing软件测试网7B2Un1rh
   result=SQAFindObject("\;Type=Window;Caption=Warning - Invalid Login")
2P oL)\P{0   msgbox result 51Testing软件测试网 f n{Is-a:V'T
   //x=1返回0 x=2 返回1003
-[~6q8f*rY,L ^X{0      if result=sqasuccess then  51Testing软件测试网PK\i qW$y
        msgbox "fail"
Is;ZhhGX0        Window SetContext, "Caption=Warning - Invalid Login", ""
-n7bi-i{Q0        PushButton Click, "Text=OK"
:O4~&c8nvd0     else 
1t7ia&vR0        msgbox "ok"51Testing软件测试网8VXV;{U
        Window SetContext, "Caption=Rational ClearQuest - RSDF :", ""51Testing软件测试网JPXfl]v
        Window CloseWin, "", ""51Testing软件测试网H Z1j(h'm
    end if51Testing软件测试网_.T4o E(x,Rq/F5uu
    next x51Testing软件测试网.jI8o,?x4k,L
End Sub51Testing软件测试网Q8K Km5A?v\
 
m&ba4p|,e0有待完善..............51Testing软件测试网O6kS!^;C#t ah

TAG: Robot技术

 

评分:0

我来说两句

Open Toolbar