51Testing软件测试论坛
标题:
[求助] :大家帮我看看我这循环有什么问题,谢谢
[打印本页]
作者:
houna305
时间:
2004-8-10 11:51
标题:
[求助] :大家帮我看看我这循环有什么问题,谢谢
Sub Main
Dim Result As Integer
dim id As integer
dim i As integer
id=234
'Initially Recorded: 2004-8-9 15:24:47
'Script Name: shanchu1
Window SetContext, "Caption=http://192.168.102.252:7001/adm/welcome.jsp - Microsoft Internet Explorer", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame",""
Browser NewPage,"HTMLTitle=角色管理",""
do
HTMLLink Click, "Type=HTMLLink;HTMLText=id", ""
PushButton Click, "Type=PushButton;Name=delete"
Window SetContext, "Caption=Microsoft Internet Explorer", ""
PushButton Click, "Text=确定"
id=id+1
loop while id<237
End Sub
这是删除从234到236的记录,删除一个可以,怎么做了循环,就不能执行呢
作者:
betty
时间:
2004-8-10 13:54
标题:
自己仔细的检查一遍,可能有什么地方粗心了一下.
作者:
houna305
时间:
2004-8-10 15:42
不好意思,可以说明么,我是新手,多多指教啊
作者:
pcl2004_27
时间:
2004-8-11 19:29
id没有作为变量传入
HTMLLink Click, "Type=HTMLLink;HTMLText=id", ""
应该改为
HTMLLink Click, "Type=HTMLLink;HTMLText=“+ cstr(id), ""
作者:
pcl2004_27
时间:
2004-8-11 20:46
变量 id
HTMLLink Click, "Type=HTMLLink;HTMLText=id", ""
这两个id是否是一个?
如果不是一个?那么你尝试一下做到大循环里边,每次打开用户管理页面,再次删除!
do
Window SetContext, "Caption=http://192.168.102.252:7001/adm/welcome.jsp - Microsoft Internet Explorer", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=mainFrame",""
Browser NewPage,"HTMLTitle=角色管理",""
HTMLLink Click, "Type=HTMLLink;HTMLText=id", ""
PushButton Click, "Type=PushButton;Name=delete"
Window SetContext, "Caption=Microsoft Internet Explorer", ""
PushButton Click, "Text=确定"
id=id+1
loop while id<237
作者:
houna305
时间:
2004-8-12 10:02
谢谢各位大侠,我得问题解决了,非常感谢!
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2