‘从数据池取数,根据结果判断循环,
7E1om0H0m|)zO^0'$include "sqautil.sbh"
51Testing软件测试网?x&~[*MaHSub Main
t8mB8l%j0 Dim Result As Integer
_Le6p-xIZ:^0 dim dp as long
b3V[4{$^#jg0 dim dpname as string
p*o+WG*C w-z1F0 dim password as string
51Testing软件测试网.Z7Ic
T)jnL dim x as integer
51Testing软件测试网Qd2^pj!J;sG dim a as string
y
s*P]5F0 dim b as string
#i
R'm7n3P$_{06Tn
P
Mq i0 StartApplication """C:\Documents and Settings\lg.REALSOCN\桌面\IDE.bat"""
x,j}+Ufm#o#~0 51Testing软件测试网4M8y B)pGtDi dp=sqadatapoolopen("userinfo")
51Testing软件测试网n*~{me;R9G Window SetContext, "Caption=C:\WINDOWS\system32\cmd.exe", ""
51Testing软件测试网3o~{:R#A R&k0z Window CloseWin, "", ""
51Testing软件测试网&a-]+d;Oo#z3N for x=1 to 2
*fF V-vY
G;t/J{0 call sqadatapoolfetch(dp)
!xfS^*s H@t|0 call sqadatapoolvalue(dp,1,dpname)
!bm W'V%iu'JomwRb6g%{0 call sqadatapoolvalue(dp,1,password)
l6mm\x6~{0 wQ*`;V%u4\l
S0 Window SetContext, "Caption=Realso 登录", ""
51Testing软件测试网O6D9O8{!? GenericObject
DblClick, "Class=MozillaWindowClass;ClassIndex=1", "Coords=174,58"
51Testing软件测试网M|_sP,?k inputkeys "{BKSP}" ----
清空TEXT文本框内容x4[,Ov$y/o;Z(c0 InputKeys dpname
51Testing软件测试网L%v@!G0B4X6a0r#W GenericObject DblClick, "Class=MozillaWindowClass;ClassIndex=1","Coords=167,106"
(rN dm/D9z0 inputkeys "{BKSP}"
51Testing软件测试网-yW As
R].lb1u-Rm4e InputKeys password
MJ+l v3S4w0 GenericObject Click, "Class=MozillaWindowClass;ClassIndex=1", "Coords=219,185"
51Testing软件测试网2H8NANJx51Testing软件测试网Kktya1J result=SQAWaitForObject("
\;Type=Window;Caption=RealSo 集成开发环境",8000)
51Testing软件测试网.F,Gw*@JzGK%C'] //等待时间设置8秒 Caption后的“=”前后不可以空[aDj+p3S0 result=SQAFindObject("type=Window;Caption=RealSo 集成开发环境")
51Testing软件测试网seR|(Q p //结果对象51Testing软件测试网Ik.f1q7t-a`p ’ MSGBOX result
//返回对象属性值51Testing软件测试网oTB FK-TaI$n3|if result=sqasuccess then
51Testing软件测试网3H@6La0N"Og1fBk6H/z;` MSGBOX 222
9B+Pj'z(`P'm1b0 Window SetContext, "Caption=RealSo 集成开发环境", ""
51Testing软件测试网NhSz1D{N GenericObject Click, "Class=MozillaWindowClass;ClassIndex=1", "Coords=1012,10"
51Testing软件测试网+D8o
r&HPt else
5Pl}$\ f ~
{0 MSGBOX 111
51Testing软件测试网*s+T7`B&[:tM%Rx Window SetContext, "Caption=[Javascrīpt Application]", ""
4mL'C3A3](D0 GenericObject Click, "Class=MozillaWindowClass;ClassIndex=1", "Coords=152,78"
oliNNJpx:O0 end if
p.u X5ZL J8x0 next x
yV o&r7eFJ n7Z0End Sub
51Testing软件测试网;p+auo(rd3d51Testing软件测试网q\X0XY/K8R+A