被GUI脚本给郁闷了.
Sub MainDim Result As Integer
'Initially Recorded: 2006-5-1611:09:15
'Script Name: 查询角色
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=1", ""
StartBrowser "http://10.1.254.50", "WindowTag=WEBBrowser"
Window SetContext, "WindowTag=WEBBrowser", ""
Window WMaximize, "", ""
Browser NewPage,"HTMLTitle=系统登录页面",""
EditBox Click, "Name=opeCode", "Coords=56,5"
InputKeys "XXXX"
EditBox Click, "Name=opePwd", "Coords=29,13"
InputKeys "XXXX"
HTMLImage Click, "Index=6", "Coords=48,14"
Browser SetFrame,"Type=HTMLFrame;HTMLId=left",""
Browser NewPage,"HTMLTitle=上报系统",""
HTMLLink Click, "Type=HTMLLink;HTMLText=角色管理;VisualText=角色管理", ""
HTMLLink Click, "Type=HTMLLink;HTMLText=查询角色;VisualText=查询角色", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=main",""
Browser NewPage,"HTMLTitle=selerole",""
HTMLLink Click, "Type=HTMLLink;HTMLText=查看;VisualText=查看", ""
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Left_Drag, "ObjectIndex=1;\;ItemIndex=2", "Coords=67,10,70,11"
Window SetTestContext, "WindowTag=WEBBrowser", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=main","" //这里可以回放成功
Browser NewPage,"HTMLTitle=selerole_dis",""
Result = HTMLTableVP (CompareData, "Type=HTMLTable;Index=1", "VP=Object Data")
Window ResetTestContext, "", ""
Window SetContext, "WindowTag=WEBBrowser", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=main","" //到这段代码出现回放不过去,提示错误发生在这里.
PushButton Click, "Type=PushButton;Name=Submit;VisualText=返回"
Browser NewPage,"HTMLTitle=selerole",""
HTMLLink Click, "Type=HTMLLink;HTMLText=查看;Index=2;VisualText=查看", ""
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=2", ""
Window SetTestContext, "WindowTag=WEBBrowser", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=main",""
Browser NewPage,"HTMLTitle=selerole_dis",""
Result = HTMLTableVP (CompareData, "Type=HTMLTable;Index=1", "VP=Object Data2")
Window ResetTestContext, "", ""
Window SetContext, "WindowTag=WEBBrowser", ""
Window CloseWin, "", ""
End Sub
如何解决这种问题. 加上Browser NewPage,"HTMLTitle=selerole_dis",""试试
加过了还是不行
加过了还是不行没折了。哪里可以获得帮助解决这类问题的方法或帮助
Window SetContext, "WindowTag=WEBBrowser", ""Browser SetFrame,"Type=HTMLFrame;HTMLId=main","" //到这段代码出现回放不过去,提示错误发生在这里.
Browser NewPage,"HTMLTitle=selerole_dis","" ------------------------添加上你指导修改的脚本。
PushButton Click, "Type=PushButton;Name=Submit;VisualText=返回"
Browser NewPage,"HTMLTitle=selerole",""
HTMLLink Click, "Type=HTMLLink;HTMLText=查看;Index=2;VisualText=查看", "" 确认PushButton Click, "Type=PushButton;Name=Submit;VisualText=返回"里的button和
Result = HTMLTableVP (CompareData, "Type=HTMLTable;Index=1", "VP=Object Data")里的table是不是在同一个frame里面 在同一个FRAME里面. 确认PushButton Click, "Type=PushButton;Name=Submit;VisualText=返回"里的button和
Result = HTMLTableVP (CompareData, "Type=HTMLTable;Index=1", "VP=Object Data")里的table是不是在同一个frame里面
你的意思是说‘返回’按钮是不是和你的HTMLTable在同一个页面。我查看了HTMLTable属性名http://10.1.254.34/public/role/selerole_dis.jsp?ID=0&NAME=超级管理员
而‘返回’按钮也是http://10.1.254.34/public/role/selerole_dis.jsp?ID=0&NAME=超级管理员。
Window SetContext, "WindowTag=WEBBrowser", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=main","" //到这段代码出现回放不过去,提示错误发生在这里.
Browser NewPage,"HTMLTitle=selerole_dis","" ------------------------添加上你指导修改的脚本。
PushButton Click, "Type=PushButton;Name=Submit;VisualText=返回"--------------------////提示错误发生在这里。
Browser NewPage,"HTMLTitle=selerole",""
HTMLLink Click, "Type=HTMLLink;HTMLText=查看;Index=2;VisualText=查看", "" 应该还是frame的问题,你在直接录制一段点PushButton的代码看是什么样的 Sub Main
Dim Result As Integer
'Initially Recorded: 2006-5-1812:32:48
'Script Name: 1
Window SetContext, "Caption=XX系统 - Microsoft Internet Explorer", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=main",""
Browser NewPage,"HTMLTitle=selerole_dis",""
PushButton Click, "Type=PushButton;Name=Submit;VisualText=返回"
Window SetContext, "Class=Shell_TrayWnd", ""
TabControl Click, "ObjectIndex=1;\;ItemIndex=1", ""
End Sub 上面是一段直接运行‘返回’按钮时录制下的脚本
一般脚本运行到这里‘返回’按钮这里就不能执行下去。在这行提示错误。 在这个button同一层上还有些什么东西,分别录制点一下看看脚本能不能回放成功 同一层?分别录制点一下?呵呵,不是很明白这句话的意思。能和你在MSN上聊吗? 你不了解frame的结构吗,我的意思就是同一个frame底下 直接在frame上录制的没有问题。能成功回放,我查看了脚本。出问题的这段脚本与直接录制的脚本一样。但是回放的结果却不一样。
页:
[1]