51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2487|回复: 2
打印 上一主题 下一主题

[Robot] robot 的功能测试

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-2-16 11:02:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我录制了一段脚本,在回放的过程中出现中断,但是程序本身并没有出现错误,请问原因是出自那里?录制的脚本如下:还有一个问题,为什么在GUI 当中datapool无法定义?而datatype却可以用呢?
Sub Main
    Dim Result As Integer

    'Initially Recorded: 2005-2-16  10:15:40
    'Script Name: 采购计划新增
   
    Window SetContext, "Caption=博通协同办公平台物流系统 - Microsoft Internet Explorer", ""
    Browser SetFrame,"Type=HTMLFrame;HTMLId=leftFrame;\;Type=HTMLFrame;Index=1",""
    Browser NewPage,"HTMLTitle=left",""
    HTMLTable Click, "Type=HTMLTable;Index=3", "Row=1;Col=2"
    HTMLTable Click, "Type=HTMLTable;Index=4", "Row=5;Col=1"
    HTML Click, "Type=HTML;HTMLId=itemcg_03_01", "Coords=62,14"
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame",""
    Browser NewPage,"HTMLTitle=采购计划",""
    HTMLLink Click, "Type=HTMLLink;HTMLId=btn_xz", ""
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame;\;Type=HTMLFrame;HTMLId=topcontent",""
    Browser NewPage,"",""
    EditBox Click, "Type=EditBox;Name=CGJHBH", "Coords=50,13"
    ComboBox Click, "Type=ComboBox;Name=JHLB", ""
    ComboListBox Click, "Type=ComboListBox;Name=JHLB", "Text=紧急计划"
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame;\;Type=HTMLFrame;HTMLId=bottomcontent",""
    Browser NewPage,"HTMLTitle=采购计划明细",""
    HTML Click, "Type=HTML;HTMLId=insertBeforeRow", "Coords=55,8"
    EditBox Click, "Type=EditBox;Name=WLBH_NO0", "Coords=32,6"
    HTMLImage Click, "Type=HTMLImage;Name=selWLBH0", "Coords=6,2"
   
    Window SetContext, "Caption=通用选择 -- 物料信息 -- 网页对话框", ""
    Browser NewPage,"HTMLTitle=通用选择 -- 物料信息",""
    PushButton Click, "Name=butView"
    Browser SetFrame,"Type=HTMLFrame;HTMLId=selComm;\;Type=HTMLFrame;HTMLId=MainList",""
    Browser NewPage,"HTMLTitle=通用选取主表列表",""
    HTML DblClick, "Type=HTML;HTMLId=tr_0", "Coords=114,10"
   
    Window SetContext, "Caption=博通协同办公平台物流系统 - Microsoft Internet Explorer", ""
    InputKeys "300{ENTER}"
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame;\;Type=HTMLFrame;HTMLId=bottomcontent",""
    HTMLLink Click, "Type=HTMLLink;HTMLText=保存(S)", ""
   
    Window SetContext, "Caption=信息 ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? -- 网页对话框", ""
    Browser NewPage,"HTMLTitle=信息 ???????????????? ???????????????? ???????????????? ???????????????? ??????",""
    PushButton Click, "Name=confirmBut"
   
    Window SetContext, "Caption=博通协同办公平台物流系统 - Microsoft Internet Explorer", ""
    Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame",""
    Browser NewPage,"",""
    PushButton Click, "Type=PushButton;HTMLTitle=Alt+R"
   
    Window SetContext, "Caption=提示 ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? ???????????????? -- 网页对话框", ""
    Browser NewPage,"HTMLTitle=提示 ???????????????? ???????????????? ???????????????? ???????????????? ??????",""
    PushButton Click, "Name=confirmBut"

End Sub
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏

该用户从未签到

2#
发表于 2005-2-17 09:27:18 | 只看该作者
设置断点,一步步的运行,不过,以我的估计这段脚本到第三行就不能正常运行了,呵呵
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2005-2-22 16:03:38 | 只看该作者

请教

我们公司也要开始使用自动测试的工具了,请问:录制脚本,回放脚本是个什么概念.具体怎么操作呢?
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-15 11:56 , Processed in 0.066358 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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