gantangyu 发表于 2005-5-23 15:11:20

大家帮我看一下,我这里为什么不能循环呀?

'$Include "sqautil.sbh"
Sub Main
    Dim Result As Integer
    Dimvarstr As string
    dimdpas long
    dimdp_id asinteger
    dimusd as string
    dimpsd as string
   
   
    'Initially Recorded: 2005-5-2310:45:31
    'Script Name: test
StartBrowser "http://192.168.18.19:8082/login.jsp", "WindowTag=WEBBrowser"

   for dp_id =1 to 2
   
   'dp=SQADatapoolOpen("test", FALSE, SQA_DP_SEQUENTIAL , True)'打开数据池
   dp =SQADatapoolOpen("test")
   call SQADatapoolFetch(dp)'从数据池读取记录

   Call SQADatapoolValue(dp,"username",usd) '将从数据池中读取的数据赋予相应变量

   Call SQADatapoolValue(dp,"password",psd)

   Window SetContext, "WindowTag=WEBBrowser", ""

   Browser NewPage,"HTMLTitle=xxxxxxx有限公司",""
   
   EditBox Click, "Name=loginName", "Coords=61,5"

' InputKeys usd&"{TAB}"&psd&"{ENTER}"
   InputKeys psd
   EditBox Click, "Name=loginPass", "Coords=17,7"
   InputKeys usd
   HTMLImage Click, "Index=3", "Coords=35,9"

   Browser SetFrame,"Type=HTMLFrame;HTMLId=left",""
   
    Browser NewPage,"",""
   
    HTMLLink Click, "Type=HTMLLink;HTMLText=工作日志", ""
   
'   HTMLLink Click, "Type=HTMLLink;HTMLId=menu;Index=13", ""
   
    Result=SQAGetProperty("Type=HTMLFrame;Name=left;\;Type=HTMLTable;Index=1","innerText",varstr)
   
    SQAconsoleWrite str(varstr)
   
   next dp_id
   
   Call SQADatapoolClose(dp)
   
   Window CloseWin, "", ""

End Sub

执行的时候怎么只是在用户名文本框中挨着输入两个admin,然后提示输入密码,很奇怪,这到底是那出错了呀?:,(

pcl2004_27 发表于 2005-5-26 03:03:01

楼主的问题 我已经回答了应该!把答案揭晓吧!
页: [1]
查看完整版本: 大家帮我看一下,我这里为什么不能循环呀?