51Testing软件测试论坛
标题:
LR11 录制脚本时,自动会录制两份脚本
[打印本页]
作者:
calm0911
时间:
2011-11-24 11:32
标题:
LR11 录制脚本时,自动会录制两份脚本
1 录制LR自带的例子 登录和退出,不做其它动作
图片中是树结构 ,例如:有WebTours和WebTours_2 里面的代码也一样的
求问:为什么我录制一次代码出现两个基本重复的代码?
具体录代码如下:
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t23.inf",
"Mode=HTML",
LAST);
web_submit_data("check_outchain.php",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t24.inf",
"Mode=HTML",
ITEMDATA,
"Name=urls", "Value=c9ada0bb27a211c6b9976f5b1951c78f|f528764d624db129b32c21fbca0cb8d6|c4ca4238a0b923820dcc509a6f75849b|cb5ae17636e975f9bf71ddf5bc542075|25e64aa754c310d45c1e084d574c1bb0|f528764d624db129b32c21fbca0cb8d6|78cac39b0f129b952e1be617c698a0fb\tZGV3YwNhZP4kCm9ZCj==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=ba2248aa", ENDITEM,
"Name=mid", "Value=90fb93b6681e5e66447926bd20bead7f", ENDITEM,
LAST);
web_url("WebTours_2",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t25.inf",
"Mode=HTML",
LAST);
web_submit_data("check_outchain.php_2",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t26.inf",
"Mode=HTML",
ITEMDATA,
"Name=urls", "Value=c9ada0bb27a211c6b9976f5b1951c78f|f528764d624db129b32c21fbca0cb8d6|c4ca4238a0b923820dcc509a6f75849b|cb5ae17636e975f9bf71ddf5bc542075|25e64aa754c310d45c1e084d574c1bb0|f528764d624db129b32c21fbca0cb8d6|78cac39b0f129b952e1be617c698a0fb\tZGV3YwNhZP4kCm9ZCj==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=ba2248aa", ENDITEM,
"Name=mid", "Value=90fb93b6681e5e66447926bd20bead7f", ENDITEM,
LAST);
lr_think_time(8);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t27.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107096.379019846ffAiHzQpQQfiDDDDDDAfcpzVQQHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=25", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
web_submit_data("login.pl_2",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t28.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107096.379019846ffAiHzQpQQfiDDDDDDAfcpzVQQHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=25", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
web_url("SignOff Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t29.inf",
"Mode=HTML",
LAST);
web_add_cookie("MSO=SID&1322104799; DOMAIN=127.0.0.1");
web_add_cookie("MTUserInfo=firstName&Joseph&address2&San%20Jose%2FCA%2F94085&username&jojo&hash&47&lastName&Marshall%0A&address1&234%20Willow%20Drive&creditCard&&expDate&%0A; DOMAIN=127.0.0.1");
web_url("SignOff Button_2",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t30.inf",
"Mode=HTML",
LAST);
return 0;
}
作者:
calm0911
时间:
2011-11-24 13:26
同仁们,帮忙一下,两台机装了LR11全是这种现像,求解啊。。
作者:
msnshow
时间:
2011-11-24 13:43
把360关掉
作者:
calm0911
时间:
2011-11-24 14:20
版主,360卸载了,电脑也重启了
之前在录快照里面有页面快照不能显示,现在可以显示了,但树结构中重复现像还是存在,如下图:
作者:
calm0911
时间:
2011-11-25 09:38
自己顶一下,为什么两台电脑,都有这情况了,录制脚本重复,求解啊
作者:
chen217222
时间:
2012-9-21 16:36
回复
5#
calm0911
我也一直被这个问题困绕,有解决的方法吗?
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2