51Testing软件测试论坛
标题:
为什么关联参数取不到任何值,请大侠帮助,多谢!
[打印本页]
作者:
fessor21
时间:
2010-1-27 15:44
标题:
为什么关联参数取不到任何值,请大侠帮助,多谢!
业务背景是:用户每次从一个列表中选择第一条记录,打开编辑。记录从列表中移出。
下次再选择时,是新的记录,记录有两个key:headerid + No.
//1. 定义关联
// [WCSPARAM WCSParam_Diff1 17 90000028|50000028] 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" [MsgId: MMSG-26000]
Action.c(151): web_submit_data("CaseToDoList.aspx_2") was successful, 120 body bytes, 288 header bytes [MsgId: MMSG-26386]
Action.c(212): Notify: Parameter Substitution: parameter "WCSParam_Diff1" = "" ---- 取不到任何值?
Action.c(212): Value Captured =
Action.c(215): web_reg_find started [MsgId: MMSG-26355]
Action.c(215): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(218): web_reg_find started [MsgId: MMSG-26355]
Action.c(218): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(222): web_url("RegisterCaseDetail.aspx") started [MsgId: MMSG-26355]
Action.c(222): t=133345ms: Already connected to 10.205.1.170:80 [MsgId: MMSG-26000]
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
作者:
nutty9
时间:
2010-1-27 16:18
关联没有定义好 看下你的边界
作者:
fessor21
时间:
2010-1-27 18:39
谢谢!确实是左边界没定义好。已经解决。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2