51Testing软件测试论坛
标题:
请问手动写lr脚步呢,在哪里添加url和用户名/密码
[打印本页]
作者:
huashinaina
时间:
2012-7-5 13:18
标题:
请问手动写lr脚步呢,在哪里添加url和用户名/密码
请问lr脚本中,怎样把没有录上的地址写进去,写在哪个位置能成功?
web_url("192.168.0.120_2",
"URL=http://192.168.0.120/",
"url=http://192.168.0.220:5001/img/login.action?username=admin&pwd=1",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=http://kernel-c.maxthon.cn/wb_cpt/dw/wk_cpt.config", "Referer=", ENDITEM,
"Url=/images/22.jpg", ENDITEM,
"Url=/images/19.jpg", ENDITEM,
"Url=/images/17.jpg", ENDITEM,
LAST);
/* Request with GET method to URL "http://192.168.0.120/favicon.ico" failed during recording. Server response : 404*/
lr_start_transaction("login");
web_submit_form("checkLoginAction.action",
"Snapshot=t7.inf",
ITEMDATA,
"Name=userName", "Value=admin", ENDITEM,
"Name=passWord", "Value=1", ENDITEM,
EXTRARES,
org.apache.jetspeed.login.username=admin&org.apache.jetspeed.login.password=1&org.apache.jetspeed.prefered.locale=zh&org.apache.jetspeed.login.destination=/j2-admin/jetspeed/portal", ENDITEM,
"Url=../images/banner-bg.jpg", ENDITEM,
"Url=../images/button2.jpg", ENDITEM,
"Url=../images/button1.jpg", ENDITEM,
"Url=../images/bg4.jpg", ENDITEM,
"Url=../images/bg1.jpg", ENDITEM,
"Url=../images/button3.jpg", ENDITEM,
"Url=../images/xg_05.gif", ENDITEM,
"Url=../images/footer-bg.jpg", ENDITEM,
"Url=http://192.168.0.220:5001/images/comm/unseltab.gif", "Referer=http://192.168.0.220:5001/cmupd/portal/xiufu_total.html", ENDITEM,
"Url=http://192.168.0.220:5001/images/comm/seltab.gif", "Referer=http://192.168.0.220:5001/cmupd/portal/xiufu_total.html", ENDITEM,
"Url=http://192.168.0.220:5001/swf/MSLine.swf?ChartNoDataText=无统计数据", "Referer=http://192.168.0.220:5001/cmupd/portal/xiufu_total.html", ENDITEM,
"Url=http://192.168.0.220:5001/img/js/My97DatePicker/skin/WdatePicker.css", "Referer=http://192.168.0.220:5001/img/pages/portal/getImageNumber.action", ENDITEM,
LAST);
作者:
云层
时间:
2012-7-7 12:58
这不就是
web_submit_form("checkLoginAction.action",
"Snapshot=t7.inf",
ITEMDATA,
"Name=userName", "Value=admin", ENDITEM,
"Name=passWord", "Value=1", ENDITEM,
用户名和密码么?
作者:
msnshow
时间:
2012-7-7 21:56
按录制下来的格式就行了嘛
作者:
huashinaina
时间:
2012-7-9 09:22
回复
2#
云层
谢谢您及时的回答,我没有表达清楚,被测系统:
框架的用户名和密码是:
"Name=userName", "Value=admin", ENDITEM,
"Name=passWord", "Value=1", ENDITEM,
我们门户和其他子系统的用户名和密码原理是 前台登录框架,后台自动添加门户和其他子系统的用户名和密码。
"url=http://192.168.0.220:5001/img/login.action?username=admin&pwd=1",
"url=http://192.168.0.220:5001/OBGISServ/DoLoginAction.do?method=userLogin&username=admin&password=1&targetId=3",
"url=http://192.168.0.220:5001/OBGISServ/DoLoginAction.do?method=userLogin&username=admin&password=1&targetId=2",
"url=http://192.168.0.220:5001/OBGISServ/DoLoginAction.do?method=userLogin&username=admin&password=1&targetId=1",
"url=http://192.168.0.120/j2-admin/jetspeed/shouboleader.psml? org.apache.jetspeed.login.username=admin&org.apache.jetspeed.login.password=1&org.apache.jetspeed.prefered.locale=zh&org.apache.jetspeed.login.destination=/j2-admin/jetspeed/portal"
这些都是后台处理的源代码,我添加在lr脚本哪里,试了几个不成功。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2