51Testing软件测试论坛

标题: 请教datapool的一个问题 [打印本页]

作者: zongzhihui2006    时间: 2005-6-21 13:03
标题: 请教datapool的一个问题
数据池定义两种字段
一个是整型一个是字符串型,脚本回放的时候失败,提示类型不匹配
但是我都定义整型或者字符串型的话,脚本是回放成功的
不懂,为什么会回放失败
请教
谢谢
都使用字符串型的脚本如下
'$include "global.sbh"
'$Include "sqautil.sbh"
    Sub Main
        Dim Result As Integer
        Dim dp as long
        Dim NotEof as Integer

        Dim keyword1 as string
        Dim keyword2 As string
        Dim keyword3 As string
        Dim keyword4 As string
   
    'Initially Recorded: 2005-6-19  12:53:25
    'Script Name: 增加用户


                dp=SQADatapoolOpen("dataPoolName",False,SQA_DP_SEQUENTIAL,True)
                NotEof=SQADatapoolFetch(dp)
       

    Window SetContext, "Caption=用户信息", ""

                    Do While NotEof=sqaDpSuccess
       


    Call SQADatapoolValue(dp,1,keyword1 )
    Call SQADatapoolValue(dp,2,keyword2 )
    Call SQADatapoolValue(dp,3,keyword3 )
    Call SQADatapoolValue(dp,4,keyword4 )

        Toolbar Click, "ObjectIndex=1;\;ItemText=增加", "Coords=21,27"
        InputKeys keyword1

        EditBox Click, "ObjectIndex=3", "Coords=29,13"
        InputKeys keyword2

        EditBox Click, "ObjectIndex=2", "Coords=38,4"
        InputKeys keyword3

        EditBox Click, "ObjectIndex=1", "Coords=67,9"
        InputKeys keyword4

        Toolbar Click, "ObjectIndex=1;\;ItemText=保存", "Coords=16,24"
        

        NotEof=SQADatapoolFetch(dp)
        loop         
        call SQADatapoolClose(dp)
   
    End Sub

[ Last edited by zongzhihui2006 on 2005-6-21 at 13:05 ]




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2