脚本回放,robot不能认识editbox?
录制过程:选择"add"按钮,出现“添加信息”页面,在页面中的一个editbox 中输入内容。希望回放过程也是如此。可实际回放过程却是:
选择“add”按钮,出现“添加信息”页面,然后停住,不进行回放。
脚本如下:
Sub Main
Dim Result As Integer
'Initially Recorded: 2005-02-2315: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 ] Browser NewPage,"HTMLTitle=uaes",""
这句话注释掉,And Try it again 加验证点应该就可以了吧 '出现新窗口
Window SetContext, "Caption=uaes - Microsoft Internet Explorer", ""
请问弹出的新窗口的Title还是"uaes - Microsoft Internet Explorer"吗?
若不是,则窗口焦点无法聚焦的! Originally posted by guirongb at 2005-2-25 08:36 AM:
Browser NewPage,"HTMLTitle=uaes",""
这句话注释掉,And Try it again
为什么要注销掉这句?:|
页:
[1]