|
录了个脚本,就是先添加一个样本类型,让后将它删除,
其中添加的action,会得到一个ID,删除的action使用这个ID将它删除,这里就需要建立关联吧?
但是录制的脚本中添加的action中:
web_submit_data("addSampleType.action",
"Action=http://10.135.106.11:81/Bio/baseInfoManagement/addSampleType.action",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"Referer=http://10.135.106.11:81/Bio/pages/baseMessage/sample-type-form.jsp?",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=id", "Value=", ENDITEM,
"Name=sampleTypeName", "Value=ddd", ENDITEM,
"Name=sampleTypeCode", "Value=dd", ENDITEM,
"Name=orderIndex", "Value=111", ENDITEM,
"Name=sampleImage", "Value=123.jpg", "File=Yes", ENDITEM,
LAST);
它的id的value是空的,但是通过URL访问却是能得到一个值,而且每次不一样。
删除的action:
web_submit_data("delSampleType.action",
"Action=http://10.135.106.11:81/Bio/baseInfoManagement/delSampleType.action",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://10.135.106.11:81/Bio/pages/baseMessage/sample-type.jsp?",
"Snapshot=t11.inf",
"Mode=HTML",
ITEMDATA,
"Name=id", "Value=280", ENDITEM,
LAST);
这里的280应该为上面添加时得到的id的value,这里应该建立关联吧?但是自动关联不行,找不到关联,
手动添加函数也不行,在删除前添加
web_reg_save_param("del",
"LB=\"Name=id\", \"Value=",
"RB=\"",
LAST);
并且把删除action里的280替换为参数,名称为del,运行后报错:找不到参数del的匹配项。
小弟急求啊,求大神拉一把~ |
|