loadrunner版本:8.1;
操作:点击“添加”》录入数据后》执行“上报”操作。
代码:
web_reg_save_param("ZID",
"LB=input id=\"form:spb_id\" type=\"hidden\" name=\"form:spb_id\" value=\"",
"RB=\"",
"Ord=1",
"Search=All",
LAST);
lr_output_message(lr_eval_string("{ZID}"));//能够成功取到关联的id号码
web_url("dbrw_lcrw_gcqzd_add.jsf",
"URL=http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.20.61:8080/jbpmjsp/jbpmlcdbrw/dbrw_fqlc_frame.jsp?thisywdmid=oab",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
lr_output_message( lr_eval_string("{ZID}"));
lr_start_transaction("发起流程");
web_submit_data("dbrw_lcrw_gcqzd_add.jsf",
"Action=http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd",
"Snapshot=t11.inf",
"Mode=HTML",
ITEMDATA,
"Name=where", "Value=", ENDITEM,
"Name=newwhere", "Value=", ENDITEM,
"Name=sorttype", "Value=", ENDITEM,
"Name=sortfield", "Value=", ENDITEM,
"Name=itemPerPage", "Value=", ENDITEM,
"Name=page", "Value=", ENDITEM,
"Name=userid_", "Value=101", ENDITEM,
"Name=id_", "Value=7061", ENDITEM,
"Name=name_", "Value=gcqzd", ENDITEM,
"Name=form:initAdd", "Value=", ENDITEM,
"Name=form:spb_id", "Value={ZID}", ENDITEM,
"Name=form:fsudt", "Value=2010-11-01 14:36:56", ENDITEM,
"Name=form:fsuid", "Value=101", ENDITEM,
"Name=form:xmmc", "Value=文昌迈号220千伏输变电新建工程>变电站>三通一平工程", ENDITEM,
"Name=form:jldw", "Value=", ENDITEM,
"Name=form:sgdw", "Value=", ENDITEM,
"Name=form:gcxm_id", "Value=128886", ENDITEM,
"Name=initthis", "Value=1", ENDITEM,
"Name=functionform:shangbao", "Value=上报", ENDITEM, //开发分析,有可能是没有触发上报按钮,执行 insert操作?
"Name=form:qzdlx", "Value=1", ENDITEM,
"Name=form:spbmc", "Value=test123", ENDITEM,
"Name=form:forxmmc", "Value=文昌迈号220千伏输变电新建工程>变电站>三通一平工程", ENDITEM,
"Name=form:bgmc", "Value=test", ENDITEM,
"Name=form:bgje", "Value=122", ENDITEM,
"Name=form:ysjl", "Value=dsdssd", ENDITEM,
"Name=form:dx", "Value=dssd", ENDITEM,
"Name=form:wgfg", "Value=sddsds", ENDITEM,
"Name=form:qt", "Value=sdds", ENDITEM,
"Name=form:jsdz", "Value=文昌", ENDITEM,
"Name=sbzl", "Value=", ENDITEM,
"Name=sbmc", "Value=", ENDITEM,
"Name=sbgg", "Value=", ENDITEM,
"Name=sbsl", "Value=", ENDITEM,
"Name=sbdw", "Value=", ENDITEM,
"Name=form", "Value=form", ENDITEM,
LAST);
lr_end_transaction("发起流程", LR_AUTO);
回放和后台都没有报错但是没有执行新增插入语句。开发分析,有可能是没有触发上报按钮,执行 insert操作?请问有什么解决方法吗。 |