51Testing软件测试论坛

标题: 脚本回放,robot不能认识editbox? [打印本页]

作者: zwl2004    时间: 2005-2-23 15:39
标题: 脚本回放,robot不能认识editbox?
录制过程:选择"add"按钮,出现“添加信息”页面,在页面中的一个editbox 中输入内容。
希望回放过程也是如此。可实际回放过程却是:
选择“add”按钮,出现“添加信息”页面,然后停住,不进行回放。
脚本如下:
Sub Main
    Dim Result As Integer

    'Initially Recorded: 2005-02-23  15:23:18
    'Script Name: 12
   
    Window SetContext, "Caption=UAES - Microsoft Internet Explorer", ""
    Browser SetFrame,"Type=HTMLFrame;HTMLId=top",""
    HTMLLink Click, "Type=HTMLLink;HTMLText=--System user management", ""
    Browser SetFrame,"Type=HTMLFrame;HTMLId=content",""
    Browser NewPage,"HTMLTitle=uaes",""
    HTMLDocument Left_Drag, "Type=HTMLDocument;HTMLTitle=uaes", "Coords=579,88,547,297"
    '选择"add"按钮
    PushButton Click, "Type=PushButton;Name=aa"
    '出现新窗口
    Window SetContext, "Caption=uaes - Microsoft Internet Explorer", ""
    Browser NewPage,"HTMLTitle=uaes",""
    EditBox Click, "Name=usernamec1", "Coords=41,6"
    EditBox DblClick, "Name=usernamec1", "Coords=41,6"
    InputKeys "2233"

End Sub

testmanager的log 中出现错误行是:
EditBox Click, "Name=usernamec1", "Coords=41,6"
真是百思不得其解,请高手相助!!!


还有啊,我单步跟踪的时候却又是好的!真是奇怪啊!

[ Last edited by zwl2004 on 2005-2-23 at 17:17 ]
作者: guirongb    时间: 2005-2-25 08:36
Browser NewPage,"HTMLTitle=uaes",""
这句话注释掉,And Try it again
作者: wzh961123    时间: 2005-3-2 20:55
加验证点应该就可以了吧
作者: 白羽轻舟    时间: 2005-3-4 10:29
'出现新窗口
    Window SetContext, "Caption=uaes - Microsoft Internet Explorer", ""

请问弹出的新窗口的Title还是"uaes - Microsoft Internet Explorer"吗?
若不是,则窗口焦点无法聚焦的!
作者: Vitamin    时间: 2005-3-22 09:20
Originally posted by guirongb at 2005-2-25 08:36 AM:
Browser NewPage,"HTMLTitle=uaes",""
这句话注释掉,And Try it again


为什么要注销掉这句?:|




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