|
6#
楼主 |
发表于 2010-9-25 15:05:34
|
只看该作者
之前我尝试过使用关联,但是失败了,添加用户时,我执行了参数化,删除的delid使用的关联的值,但是结果我运行了3次,系统始终只删除参数化中的第一个值
添加的提交操作
web_submit_data("UserItem2.aspx_2",
"Action=http://testing1/c6/Web.Users/UserItem2.aspx?Module=user&key=&actionType=0&ouID=1",
"Method=POST",
"RecContentType=text/html",
"Referer=http://testing1/c6/Web.Users/UserItem2.aspx?Module=user&key=&actionType=0&ouID=1",
"Snapshot=t124.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState10}", ENDITEM,
"Name=hidPosiId", "Value=", ENDITEM,
"Name=txtUserID", "Value={useradd}", ENDITEM,
"Name=txtLoginCode", "Value={useradd}", ENDITEM,
"Name=txtUserName", "Value={useradd}", ENDITEM,
"Name=ddlMainDept", "Value=集团", ENDITEM,
"Name=ddlUserType", "Value=0", ENDITEM
"Name=ddlDept", "Value=单击选择兼职部门", ENDITEM,
"Name=txtSequence", "Value=", ENDITEM,
"Name=ddlInTheDeptDuty", "Value=-1", ENDITEM,
"Name=ddlIsLeaderJZ", "Value=1", ENDITEM,
"Name=btnYes", "Value=确定", ENDITEM,
"Name=hiSendXML", "Value=", ENDITEM,
"Name=hiDeptID", "Value=", ENDITEM,
"Name=hiDeptName", "Value=", ENDITEM,
"Name=hidInitPWD", "Value=", ENDITEM,
"Name=deptid", "Value=1", ENDITEM,
"Name=Subdeptid", "Value=", ENDITEM,
"Name=HidLoginCode", "Value=", ENDITEM,
LAST);
关联操作:
web_reg_save_param("DelID",
"LB=id=\"btnDelID\" value=\"",
"RB=\"",
"Ord=1",
LAST);
删除用户操作:
web_submit_data("UserList.aspx_3",
"Action=http://testing1/c6/Web.Users/UserList.aspx?nodeid=",
"Method=POST",
"RecContentType=text/html",
"Referer=http://testing1/c6/Web.Users/UserList.aspx?nodeid=",
"Snapshot=t128.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__EVENTTARGET", "Value=dgUserList", ENDITEM,
"Name=__EVENTARGUMENT", "Value=ButtonClick,删除", ENDITEM,
"Name=_dgUserListLockNumber", "Value=1", ENDITEM,
"Name=_dgUserListRecordCount", "Value={recordcount}", ENDITEM,
"Name=__VIEWSTATE", "Value=/wEPDwUKLTE4MzYyNDA3Mg8WCB4Jc3RyRGVwdElEZR4IRGVwdExpc3QF",ENDITEM,
"Name=_dgUserListIdentify", "Value={DelId}", ENDITEM,
"Name=textfield", "Value=", ENDITEM,
"Name=btnDelID", "Value={DelId}", ENDITEM,
LAST);
但是脚本执行三次之后,结果是添加用户的参数取的是正确的,但是删除时,只删除了第一个用户;
在server response中查看时取到的关联值是
<td class="td2"><input id="allChk" style="VISIBILITY: hidden" type="checkbox" name="allChk"><input name="btnDelID" type="hidden" id="btnDelID" value="1" />
参数化的内容为:1,2,3 执行三次之后,服务器响应中的btndelid还是第一次录制时候的用户,不知道是什么原因,是否是我参数化做错了??请教各位帮忙啊~~~~ |
|