51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2910|回复: 6
打印 上一主题 下一主题

[Robot] 头文件引用错误,请求急援!

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2004-10-7 21:56:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在录制了一段脚本后,并引入datapool,也对“sqautil.sbh”进行了头文件引用说明,可依然出现了错误:
对“sqautil.sbh”文件中的一系列DECLARE语句指出了同一错误“ILLEGAL STATEMENT!”
望高手不吝赐教!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏

该用户从未签到

2#
发表于 2004-10-8 13:26:26 | 只看该作者
请把你的脚本和错误写清楚。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2004-10-8 15:28:00 | 只看该作者

脚本

Sub Main
    '$Include "SQAUTIL.SBH"
    Dim Result As Integer
    dim x as integer
    dim dp as long
    dim user as string
    dim pw as string
    dp = sqadatapoolopen("test");
    for x =1 to 5
    call sqadatapoolfetch(dp)
    call sqadatapoolvalue(dp,1,user)
    call sqadatapoolvalue(dp,2,pw)

    'Initially Recorded: 2004-9-27  10:14:08
    'Script Name: new1
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    Toolbar Click, "ObjectIndex=2;\;ItemText=Æô¶¯ Internet Explorer ä¯ÀÀÆ÷", "Coords=8,16"
   
    Window SetContext, "Caption=about:blank - Microsoft Internet Explorer", ""
    ComboBox Click, "ObjectIndex=4", "Coords=830,4"
    ComboListBox VScrollTo, "ObjectIndex=4", "Position=1"
    ComboListBox Click, "ObjectIndex=4", "ItemData=1731544"
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame",""
    Browser NewPage,"HTMLTitle=¾­¼Ã»§¿Ú×ۺϹÜÀí-¼à¹Üϵͳ",""
    EditBox Click, "Type=EditBox;Name=loginName", "Coords=40,11"
    InputKeys user
    HTMLTable Click, "Type=HTMLTable;Index=3", "Row=1;Col=4"
    EditBox Click, "Type=EditBox;Name=password", "Coords=66,9"
    InputKeys pw
    PushButton Click, "Type=PushButton;Name=Submit"
    Window CloseWin, "", ""
    next x
    call sqadatapoolclose(dp)
End Sub
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2004-10-8 15:29:22 | 只看该作者

错误

以下是错误提示:
Compiling new1.rec...
SQAUTIL.SBH(5) Error: Illegal statement
SQAUTIL.SBH(17) Error: Illegal statement
SQAUTIL.SBH(18) Error: Illegal statement
SQAUTIL.SBH(20) Error: Illegal statement
SQAUTIL.SBH(21) Error: Illegal statement
SQAUTIL.SBH(23) Error: Illegal statement
SQAUTIL.SBH(25) Error: Illegal statement
SQAUTIL.SBH(26) Error: Illegal statement
SQAUTIL.SBH(27) Error: Illegal statement
SQAUTIL.SBH(28) Error: Illegal statement
SQAUTIL.SBH(30) Error: Illegal statement
SQAUTIL.SBH(31) Error: Illegal statement
SQAUTIL.SBH(32) Error: Illegal statement
SQAUTIL.SBH(35) Error: Illegal statement
new1.rec(9) Error: Variable sqadatapoolopen undefined
new1.rec(11) Error: Unknown function: sqadatapoolfetch
new1.rec(12) Error: Unknown function: sqadatapoolvalue
new1.rec(13) Error: Unknown function: sqadatapoolvalue
new1.rec(35) Error: Unknown function: sqadatapoolclose
0 warning(s), 19 error(s)
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2004-10-10 11:00:43 | 只看该作者
你把头文件放在了脚本中,应该修改为

'$Include "SQAUTIL.SBH"   

Sub Main
        Dim Result As Integer
    dim x as integer
    dim dp as long
    dim user as string
    dim pw as string
    dp = sqadatapoolopen("test");
    for x =1 to 5
    call sqadatapoolfetch(dp)
    call sqadatapoolvalue(dp,1,user)
    call sqadatapoolvalue(dp,2,pw)

    'Initially Recorded: 2004-9-27  10:14:08
    'Script Name: new1
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    Toolbar Click, "ObjectIndex=2;\;ItemText=Æô¶¯ Internet Explorer ä¯ÀÀÆ÷", "Coords=8,16"
   
    Window SetContext, "Caption=about:blank - Microsoft Internet Explorer", ""
    ComboBox Click, "ObjectIndex=4", "Coords=830,4"
    ComboListBox VScrollTo, "ObjectIndex=4", "Position=1"
    ComboListBox Click, "ObjectIndex=4", "ItemData=1731544"
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame",""
    Browser NewPage,"HTMLTitle=¾­¼Ã»§¿Ú×ۺϹÜÀí-¼à¹Üϵͳ",""
    EditBox Click, "Type=EditBox;Name=loginName", "Coords=40,11"
    InputKeys user
    HTMLTable Click, "Type=HTMLTable;Index=3", "Row=1;Col=4"
    EditBox Click, "Type=EditBox;Name=password", "Coords=66,9"
    InputKeys pw
    PushButton Click, "Type=PushButton;Name=Submit"
    Window CloseWin, "", ""
    next x
    call sqadatapoolclose(dp)
End Sub
回复 支持 反对

使用道具 举报

该用户从未签到

6#
 楼主| 发表于 2004-10-10 12:11:08 | 只看该作者
thks
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 2005-3-24 15:30:58 | 只看该作者
终于知道错误的原因了!谢谢!
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-26 19:23 , Processed in 0.068980 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表