|
1.比如说,测试一个用户登入窗口,用户名和密码应该是一一对应的。但是用以下脚本取出的用户名和密码不能一一对应,请问有什么函数能做到么?
2. 脚本结尾的时候,Datapool已经被关闭了,但是,为什么还不能在TestManager中打开Datapool进行编辑呢?
'$include"SQAUTIL.SBH"
Sub Main
Dim Result As Integer
dim dp as long
dim inputstr as string
'Initially Recorded: 2004-11-4 17:25:34
'Script Name: test2
sqaconsoleclear
dim i as integer
for i= 1 to 10
dp=SQADatapoolOpen("userinfo", FALSE, SQA_DP_SEQUENTIAL , True)
Call SQADatapoolFetch(dp)
Call SQADatapoolValue(dp,1,inputstr)
sqaconsolewrite "the user name is :" & inputstr
call sqadatapoolfetch(dp)
Call SQADatapoolValue(dp,2,inputstr)
sqaconsolewrite "the password is :" & inputstr
next i
Call SQADatapoolRewind (dp)
Call SQADatapoolClose(dp)
End Sub
诚意致谢,多谢高手解答!! |
|