手动关联
用WDIFF比较两个脚本之后,找到了一个可能是需要关联的动态数据"Name=fileName", "Value=11799678088795434", ENDITEM,
并且在Recording log中也找到了这个数据,但在Exection Log 中却没有找到这个数据,我一行一行查找到了一个相似的数据;
\t\t\t<input type="hidden" name="fileName" value="11799682837732521">\n
这个
请大家帮我分析一下原因 我认为先明确录制的功能是什么,然后与开发人员沟通一下。还有一点疑问,这两个值是第一个11799678088795434是录制时的,第二个11799682837732521是回放时的吗? Recording log难道不包括Extend log吗?
你说的Recording Log值得是是什么,你的Extend log又是怎么得到的? 首先看<input type=hidden">
你要录制的这个input是隐藏类型的.
另外value=""一大串不规则的数字,似乎是暗文.加密后的值,如果你要对它关联.肯定还需要一个解密的过程.才能获取这个VALUE的真正值,
依我看这个地方并不是你需要关联的地方.虽然它会变.
我把脚本贴上来
前三个是我自己关联的,后两个是自动关联的Action()
{
web_reg_save_param("fileName","LB=input type=\"hidden\" name=\"fileName\" value=","RB=>",LAST);
web_reg_save_param("lt","LB=input type=\"hidden\" name=\"lt\" value=","RB=>",LAST);
web_url("scm",
"URL=http://192.168.1.11:8080/scm",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_rendezvous("loggingin");
lr_start_transaction("logging in");
web_reg_save_param("ticket","LB=ticket=","RB=>",LAST);
// Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff1", "LB=<", "RB=>", "Ord=1", "Search=Body", "RelFrameId=1", LAST );
// Parameter {WCSParam_Diff2} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff2", "LB=html>\n<", "RB=>", "Ord=1", "Search=Body", "RelFrameId=1", LAST );
web_submit_data("login",
"Action=https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.11%3A8080%2Fscm%2F",
"Method=POST",
"RecContentType=text/html",
"Referer=https://www.seekcall.com:8443/cas/login?service=http%3A%2F%2F192.168.1.11%3A8080%2Fscm%2F",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=fileName", "Value={fileName}", ENDITEM,
"Name=lt", "Value={lt}", ENDITEM,
"Name=username", "Value=xs80$#*@$it01", ENDITEM,
"Name=companyCode", "Value=it01", ENDITEM,
"Name=uname", "Value={wgxsry_name}", ENDITEM,
"Name=password", "Value={wgxsry_password}", ENDITEM,
"Name=validateCode", "Value=16888", ENDITEM,
LAST);
web_url("scm_2",
"URL=http://192.168.1.11:8080/scm/?ticket={ticket}",
"Resource=0",
"RecContentType=text/{WCSParam_Diff1}",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
web_url("authentication.action",
"URL=http://192.168.1.11:8080/scm/authentication.action",
"Resource=0",
"RecContentType=text/{WCSParam_Diff1}",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=web/newPage/images/guideThreeBg.jpg", ENDITEM,
"Url=web/newPage/images/sideContentsFootimg.jpg", ENDITEM,
"Url=web/newPage/images/sideContentsBg.jpg", ENDITEM,
"Url=web/newPage/images/{WCSParam_Diff2}BgLine.jpg", ENDITEM,
"Url=web/newPage/images/oneMenuleft.gif", ENDITEM,
"Url=web/newPage/images/oneMenuOnclickright.gif", ENDITEM,
"Url=web/newPage/images/oneMenuOnclickleft.gif", ENDITEM,
"Url=web/newPage/images/ahover.gif", ENDITEM,
"Url=web/newPage/images/sideLayoutTitle.jpg", ENDITEM,
"Url=web/newPage/images/sideLumpTitle.jpg", ENDITEM,
"Url=web/newPage/images/logo.jpg", ENDITEM,
"Url=web/newPage/images/oneMenuright.gif", ENDITEM,
LAST);
web_find("web_find",
"RightOf=20",
"What=07",
LAST);
lr_end_transaction("logging in", LR_AUTO);
return 0;
回放后出现了下面的错误
Action.c(8): \t\t\t <tr id="loginErrorInf">\nAction.c(8): \t\t <td class="loginErrorInf" colspan="3">\n
Action.c(8): Notify: Saving Parameter "fileName = "11799782835061843""
Action.c(8): Notify: Saving Parameter "lt = "LT-111-OO32MhSv1E7UYj1uP4jf" /"
Action.c(8): .loginErrorInf{\r\n
Action.c(28): Notify: Parameter Substitution: parameter "fileName" =""11799782835061843""
Action.c(28): Notify: Parameter Substitution: parameter "lt" =""LT-111-OO32MhSv1E7UYj1uP4jf" /"
Action.c(28): Notify: Parameter Substitution: parameter "wgxsry_name" ="xs80
Action.c(28): Notify: Parameter Substitution: parameter "wgxsry_password" ="123456"
Action.c(28): \t\t\t <tr id="loginErrorInf">\n
Action.c(28): \t\t <td class="loginErrorInf" colspan="3">\n
Action.c(28): Notify: Saving Parameter "WCSParam_Diff1 = html"
Action.c(28): Notify: Saving Parameter "WCSParam_Diff2 = head"
Action.c(28): Error -26377: No match found for the requested parameter "ticket". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(28): Notify: Saving Parameter "ticket = "
Action.c(28): web_submit_data("login") highest severity level was "ERROR", 6438 body bytes, 374 header bytes
Action.c(28): Notify: Transaction "logging in" ended with "Fail" status (Duration: 0.9419 Wasted Time: 0.0076).
Ending action Action. 我前三个关联是否写对了呢 那一长串的数字不是你需要做手动关联的地方。
那种长串数字 在脚本中一般都会比较多的。自动关联就可以搞定。
你可以在找找。有什么别的什么需要关联的地方
页:
[1]