LR9.5l录制待处理事务,修改脚本的迷惑
Action(){
//打开页面
web_browser("case",
DESCRIPTION,
ACTION,
"Navigate=http://32.1.2.244:9080/case",
LAST);
lr_think_time(4);
//输入登陆用户admin和密码1,并点击提交
web_edit_field("account",
"Snapshot=t1.inf",
DESCRIPTION,
"Type=text",
"Name=account",
ACTION,
"SetValue=admin",
LAST);
web_edit_field("pwd",
"Snapshot=t2.inf",
DESCRIPTION,
"Type=password",
"Name=pwd",
ACTION,
"SetEncryptedValue=4bcd5a23ad", //密码加密
LAST);
web_edit_field("pwd_2",
"Snapshot=t3.inf",
DESCRIPTION,
"Type=password",
"Name=pwd",
ACTION,
"UserAction=Submit",
LAST);
web_text_link("管理系统",
"Snapshot=t4.inf",
DESCRIPTION,
"Text=管理系统",
ACTION,
"UserAction=Click",
LAST);
lr_think_time(4);
//点击查看
web_text_link("[查看]",
"Snapshot=t5.inf",
DESCRIPTION,
"Text=[查看]",
"FrameName=mainFrame",
ACTION,
"UserAction=Click",
LAST);
//进入待处理事务界面
web_text_link("【4月14日测试】《$$$$$$$$$\xD5", //$代表一个汉字这里截断了
"Snapshot=t6.inf",
DESCRIPTION,
"Text=【4月14日测试】《$$$$$$$$$$$审批表》<部门负责人审批> 提交人:超级管理员 要求办结时间:2010-04-17", //$代表一个汉字
"Ordinal=1",
"BrowserOrdinal=2",
ACTION,
"UserAction=Click",
LAST);
web_list("usershort",
"Snapshot=t7.inf",
DESCRIPTION,
"Name=usershort",
"FrameName=mainFrame",
"BrowserOrdinal=3",
ACTION,
"Select=同意!!!!",
LAST);
web_reg_dialog(
DESCRIPTION,
"Type=Confirm",
"Message=您确定同意,送领导审批吗?",
"BrowserOrdinal=3",
ACTION,
"Click=OK",
LAST);
web_button("INPUT",
"Snapshot=t8.inf",
DESCRIPTION,
"Type=button",
"Tag=INPUT",
"ID=",
"Value=同意,送领导审批",
"FrameName=workflow",
"BrowserOrdinal=3",
ACTION,
"UserAction=Click",
LAST);
web_radio_group("user",
"Snapshot=t10.inf",
DESCRIPTION,
"Name=user",
"FrameName=workflow",
"BrowserOrdinal=3",
ACTION,
"SelectValue=3116",
LAST);
web_reg_dialog(
DESCRIPTION,
"Type=Confirm",
"Message=您确定提交此表单吗?",
"BrowserOrdinal=3",
ACTION,
"Click=OK",
LAST);
web_button("INPUT_2",
"Snapshot=t11.inf",
DESCRIPTION,
"Type=button",
"Tag=INPUT",
"ID=sub",
"FrameName=workflow",
"BrowserOrdinal=3",
ACTION,
"UserAction=Click",
LAST);
lr_think_time(4);
web_browser("Close",
"Snapshot=t14.inf",
DESCRIPTION,
"Ordinal=2",
ACTION,
"UserAction=Close",
LAST);
lr_think_time(6);
web_text_link("重新登录",
"Snapshot=t15.inf",
DESCRIPTION,
"Text=重新登录",
"FrameName=topFrame",
"FrameOrdinal=1",
ACTION,
"UserAction=Click",
LAST);
web_edit_field("account_2",
"Snapshot=t16.inf",
DESCRIPTION,
"Type=text",
"Name=account",
ACTION,
"FireEvent=onfocus",
LAST);
return 0;
}
问题:
(1),为什么web_text_link函数中截断信息,初步判断这里的截断对程序没有什么影响,它只是一个stepName而已
(2),待处理界面的链接很多.而且各个链接信息不同,需要实现如下功能:
脚本迭代一次,链接一个页面,处理该页面后, 结束这次迭代,再迭代一次,处理下一链接,
如何处理web_text_link函数中的text和Ordinal之间的关系???
如果各个链接信息一样,通过参数化Ordinal应该可以实现
现在的情况是各个链接信息不一样???
(3)
"Ordinal=1",
"BrowserOrdinal=2",
什么区别啊,具体什么用处?? 自己顶一个啊!
我也给你顶一个
:lol 别用ajax方式录制脚本,换http协议来录制,你这个脚本维护起来很麻烦的 说实话,没怎么看懂,楼主这个脚本是做了什么工作
页:
[1]