为什么关联参数取不到任何值,请大侠帮助,多谢!
业务背景是:用户每次从一个列表中选择第一条记录,打开编辑。记录从列表中移出。下次再选择时,是新的记录,记录有两个key:headerid + No.
//1. 定义关联
// Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param("WCSParam_Diff1",
"LB= value=",
"RB=\"",
"Ord=15",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);
//2.应用关联:从list 中选择一条记录提交,需要参数化的是headerid + No.
//录制时headerid= 90000028 ,No.=No50000028,记录从数据库取得,每次选择不一样。
web_submit_data("CaseToDoList.aspx_2",
"Action=http://192.168.0.1/testCaseModule/CaseToDoList.aspx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.0.1/testCaseModule/CaseToDoList.aspx",
"Snapshot=t23.inf",
"Mode=HTML",
...
//3. 应用前脚本是:"Name=rdoHeaderID", "Value=90000028|50000028", ENDITEM,
"Name=rdoHeaderID", "Value={WCSParam_Diff1}", ENDITEM,
LAST);
//4. 打印 {WCSParam_Diff1}
lr_output_message("Value Captured = %s", lr_eval_string("{WCSParam_Diff1}"));
//5. 由于WCSParam_Diff1 没有取到值,还没有引用到其他地方
web_url("RegisterCaseDetail.aspx",
"URL=http://192.168.0.1/testCaseModule/RegisterCaseDetail.aspx?SourceType=1&CreateType=0&HeaderID=90000028&No.=50000028",
"Resource=0",
=== Replaylog:
Action.c(151): t=132898ms: 120-byte response body for "http://192.168.0.1/testCaseModule/CaseToDoList.aspx" (RelFrameId=1, Internal ID=93)
Action.c(151): 101|pageRedirect||/otstest/OrderTrace/CaseModule/RegisterCaseDetail.aspx?SourceType=1&Crea
Action.c(151): teType=0&HeaderID=&No。=|
Action.c(151): t=132962ms: Request done "http://192.168.0.1/testCaseModule/CaseToDoList.aspx"
Action.c(151): web_submit_data("CaseToDoList.aspx_2") was successful, 120 body bytes, 288 header bytes
Action.c(212): Notify: Parameter Substitution: parameter "WCSParam_Diff1" =""---- 取不到任何值?
Action.c(212): Value Captured =
Action.c(215): web_reg_find started
Action.c(215): Registering web_reg_find was successful
Action.c(218): web_reg_find started
Action.c(218): Registering web_reg_find was successful
Action.c(222): web_url("RegisterCaseDetail.aspx") started
Action.c(222): t=133345ms: Already connected to 10.205.1.170:80
Action.c(222): t=133353ms: 674-byte request headers for "http://192.168.0.1/testCaseModule/RegisterCaseDetail.aspx?SourceType=1&CreateType=0&HeaderID=90000028&No.=50000028" (RelFrameId=1, Internal ID=94)
Action.c(222): GET /otstest/OrderTrace/CaseModule/RegisterCaseDetail.aspx?SourceType=1&CreateType=0&Heade
Action.c(222): rID=90000028&No.=50000028 HTTP/1.1\r\n 关联没有定义好 看下你的边界 谢谢!确实是左边界没定义好。已经解决。
页:
[1]