|
新建了一个名为login的datapool,里面包含两字段username、password,以下代码回放时能取到值,但是取值的时候取的是第1、3、4、6、8行的值,其他的跳过去了,不知道为什么,是不是下面代码的问题,请各位指教
'$Include "sqautil.sbh"
Sub Main
Dim Result As Integer
Dim dp_id as long
'Dim num as Integer
Dim dp_Result as long
Dim username as string
Dim password as string
Dim x as Integer
'num=InputBox("10")
x=1
while x<=10
'Initially Recorded: 2007-8-17 10:54:52
'Script Name: qd_fya_登陆test
StartBrowser "http://ip/xt", "WindowTag=WEBBrowser"
dp_id = SQADatapoolOpen ("login",FALSE,SQA_DP_SEQUENTIAL,FALSE)
call SQADatapoolFetch(dp_id)
call SQADatapoolValue(dp_id,"username",username)
call SQADatapoolValue(dp_id,"password",password)
call SQADatapoolFetch(dp_id)
Window SetContext, "WindowTag=WEBBrowser", ""
Browser NewPage,"HTMLTitle=××系统",""
SetThinkAvg 4359
EditBox Click, "Name=username", "Coords=14,9"
SetThinkAvg 4125
TypingDelays "0, 250, 187, 218"
InputKeys username
SetThinkAvg 1516
EditBox Click, "Name=password", "Coords=38,10"
SetThinkAvg 1032
TypingDelays "0, 234, 187, 282"
InputKeys password
SetThinkAvg 3500
HTMLImage Click, "Index=1", "Coords=17,26"
Result = WindowVP (Exists, "Caption=××系统 -", "VP=Window Existence;Wait=20,30")
x=x+1
wend
dp_Result = SQADatapoolClose(dp_id)
End Sub
[ 本帖最后由 calykong 于 2007-8-18 12:29 编辑 ] |
|