|
dp=SQADatapoolOpen("ID_Data")
for x=1 to 2
Call SQADatapoolFetch(dp)
'从数据池中读取记录
Call SQADatapoolValue(dp,1,ID)
'将从数据池中读取的数据赋予相应变量
Call SQADatapoolClose(dp)
'关闭数据池
'=================================
URLa=ID
URLb="www.cnta.com/10-lxs/view.asp?id="
URL=URLb+URLa
StartBrowser URL, "WindowTag=WEBBrowser"
DelayFor (15000)
Window SetTestContext, "Caption=中国旅游网 - Microsoft Internet Explorer", ""
Result=SQAGetProperty("Type=HTMLTableCell;Index=8","innerText",manager)
Result=SQAGetProperty("Type=HTMLTableCell;Index=10","innerText",commissary)
Result=SQAGetProperty("Type=HTMLTableCell;Index=12","innerText",address)
Result=SQAGetProperty("Type=HTMLTableCell;Index=14","innerText",post)
Result=SQAGetProperty("Type=HTMLTableCell;Index=16","innerText",Email)
Result=SQAGetProperty("Type=HTMLTableCell;Index=18","innerText",tel)
Result=SQAGetProperty("Type=HTMLTableCell;Index=20","innerText",license)
Result=SQAGetProperty("Type=HTMLTableCell;Index=22","innerText",fax)
sum=manager+"/"+commissary+"/"+address+"/"+post+"/"+Email+"/"+tel+"/"+license+"/"+fax
open "c:\Test.txt" for Append as #1
print #1,sum
close #1
Window CloseWin, "", ""
next
Call SQADatapoolClose(dp)
我读到第二个就读不出了,我数据池中只有两个数据,为什么呢,请版主帮忙
[ Last edited by djw1999 on 2005-3-7 at 22:31 ] |
|