|
5#
楼主 |
发表于 2004-10-13 17:20:27
|
只看该作者
THKS
不过能麻烦你帮我看一下以下这段脚本否:
'$include "sqautil.sbh"
Sub Main
Dim result As Integer
dim dp as long
dim x as integer
dim nm as string
dim ps as string
dim ck as variant
dp=sqadatapoolopen("test")
'Initially Recorded: 2004-10-11 17:16:56
'Script Name: test1
for x=1 to 5
call sqadatapoolfetch(dp)
call sqadatapoolvalue(dp,1,nm)
call sqadatapoolvalue(dp,2,ps)
Window SetContext, "Caption=¾­¼Ã»§¿Ú×ۺϹÜÀí-¼à¹Üϵͳ - Microsoft Internet Explorer", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame;\;Type=HTMLFrame;HTMLId=llFrame",""
Browser NewPage,"HTMLTitle=¾­¼Ã»§¿Ú×ۺϹÜÀí-¼à¹Üϵͳ",""
EditBox Click, "Type=EditBox;Name=loginName", "Coords=67,9"
InputKeys nm
EditBox Click, "Type=EditBox;Name=password", "Coords=28,10"
InputKeys ps
PushButton Click, "Type=PushButton;Name=Submit"
Browser SetFrame,"",""
result=sqagetproperty("caption=¾­¼Ã»§¿Ú×ۺϹÜÀí-¼à¹Üϵͳ - Microsoft Internet Explore;\;type=htmlframe;htmlid=mainframe;htmltitle=loginerr.jsp","title",ck)
if ck=1 then SQALogMessage sqaWarning, "error", "the pssword is error!"
msgbox ck
Toolbar Click, "ObjectIndex=7;\;ItemID=1020", "Coords=4,7"
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=4", ""
next
call sqadatapoolclose(dp)
End Sub
运行结果我并未能取得title值
注:乱码显示的地方是因为复制到论坛过程中造成的。
[ Last edited by billrub on 2004-10-13 at 17:26 ] |
|