对于录制只读的控件,如何能正常录制?因为在只读这里总是报错。
1、Action.c(29): web_link("技术类(时间资源)") was successful, 46169 body bytes, 1463 header bytes
Action.c(36): Error -27983: Attempting to modify "readonly" field "ctl00$ContentPlaceHolder1$txtDeptNo"
Action.c(36): web_submit_form("List.aspx") highest severity level was "ERROR", 0 body bytes, 0 header bytes
Ending action Action.
以上是错误脚本。
“new”是一个事务的名字
为什么会出现这个问题呢? (为什么是尝试修改“只读”失败呢?怎么是只读呢?)
这段脚本是这样的:
lr_start_transaction("new");
web_submit_form("List.aspx_2",
"Snapshot=t14.inf",
ITEMDATA,
"Name=ctl00$ContentPlaceHolder1$txtApplyNo", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtPostName", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtRequirementDept", "Value=", ENDITEM,
"Name=checks", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnAdd", "Value=新增", ENDITEM,
LAST);
lr_think_time(57);
web_submit_data("Add_TPT.aspx_2",
"Action=http://10.24.8.42/iPSARRD/RRD/RRDApply/RequirementApply/TPT/Add_TPT.aspx?oper=add",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.24.8.42/iPSARRD/RRD/RRDApply/RequirementApply/TPT/Add_TPT.aspx?oper=add",
"Snapshot=t15.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value=/"
"wEPDwUKMTM5NjQ4NzE4OQ9kFgJmD2QWAmYPZBYKZg8WAh4Dc3JjBScvaVBTQVJSRC9Db21tb24vSW1nL2lvYV9zaXRlbG9nb19lbi5naWZkAgMPZBYCAgEPZ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BQ1yZXR1cm4gZmFsc2U7ZAIJDw8WAh8DaBYEHwQFHmlmKCFDaGVja0FncmVlKCkpcmV0dXJuIGZhbHNlOx8FBQ1yZXR1cm4gZmFsc2U7ZAIKDw8WAh8DaGRkAgsPDxYCHwNnFgQfBAUdaWYoIUNoZWNrU2F2ZSgpKXJldHVybiBmYWxzZTsfBQUNcmV0dXJuIGZhbHNlO2QCDA8PFgIfA2gWAh8EBSFpZiAoIUNoZWNrUmVqZWN0KCkpIHJldH"
"XIxJGNoa090aGVycwU1Y3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRXb3JrZmxvd2N0bDEkY2JXaWxsU2VuZE1haWy7+ACy7WvwnUTAAZPZzefUsieMKg==", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtBaseinfo", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtApplyerName", "Value=刘小飞", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtApplyerID", "Value=658", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtApplyerNo", "Value=ISS051244", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$ddlWorkPlace", "Value=2", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtRequirementDepartment", "Value=需求部门", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$ddlRecommendPrize", "Value=1", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtPostName", "Value=职位名称", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$rblSecretLevel", "Value=0", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$ddlSalary", "Value=1", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dteEndTime", "Value=2008-04-17", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtSalaryLow", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtSalaryHigh", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtRequirementAmount", "Value=2", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtAverageQuate", "Value=200", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtClientName", "Value=客户名称", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtOfficePlace", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dtRetrialTime", "Value=2008-04-18", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtMaxHuntFee", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$SettingCatalog", "Value=0", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtDimission", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dtDimissionTime", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dtExpectDimissionTime", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtPrjNo", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtPrjName", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtPrjStatus", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dtPrjStart", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dtPrjEnd", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtReservationReason", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$dtCloseTime", "Value=2008-04-21", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtWorkCityName", "Value=天津", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$rblOpenLevel", "Value=1", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtBaseinfo2", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtEduBG", "Value=无", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtForeignLevel", "Value=无", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtJobTime", "Value=无", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtIndustryBG", "Value=无", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtMainPostTrust", "Value=无", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtSkillRequire", "Value=无", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtOthers", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$Workflowctl1$btnSubmit", "Value=提交", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWXQL8+M/dAgK095+wBQKGl9zpAwLMv/agBQLYppumDAKumYnjBQKvmYnjBQKZ79vxCALkvdDfBwLr37aMAQKPodVXAoihuVgCqrHoiA4CtbHoiA4CtLHoiA4Ct7HoiA4CtrHoiA4CsbHoiA4CsLHoiA4Cs7HoiA4CorHoiA4CrbHoiA4CtbGoiw4CtbGkiw4CtbGgiw4CtbGciw4CtbGYiw4Ch+GEggkClsXhsQQChqrL3wgCmarL3wgCmKrL3wgCm6rL3wgCn7nugAIC0O7mvQICz+7mvQIC34HM0w4C5r2Mog8C9tKmzAMC6dKmzAMC6NKmzAMC69KmzAMC6tKmzAMC7dKmzAMC7NKmzAMCuJzUtQ8C4O+R3wEC1JGulwYC25XXiQECldXz+AsClr39kAIChOT5TwLUt5S2BgLoydK1BALXrZGoAQLf04v+BALfuKfnDQK4trH1DgKcz+"
"B2Asf/y98GApvx4u4KAqG8r9cPAqqhoK0FArWhoK0FArShoK0FArehoK0FArH8jJgCArOhjZ0PAojgoNEMAr6bzM0LArWp6OMEAtXDiLMMAtac9vsOAsKF04YFApy9+NoKAuuRqakPAqPFpOEMAsiolf0OAteolf0OAtjHv5MCAoTDppUGAuS9mN4HAqz/8cwBAqmz08UHArzK/pkIArqrgZgHAt71q24C+82N+wQCovahoAsCkefkmwEC+d/+xQgCt/b7pg8C9+PsygVPo9IGLWszUF13x9QAmtfPgkdk+A==", ENDITEM,
LAST);
lr_end_transaction("new",LR_AUTO);
2、另外,在日志中有一个警告是这样说的:
Action.c(4): Warning -26631: HTTP Status-Code=400 (Bad Request) for "http://10.24.8.42/iPSARRD/<%= iPSARRD.SysFrameWork.Configuration.ApplicationPath+"/Common/StyleOld/style.css" %>"
Action.c(4): web_url("SpecialEntrance.aspx") highest severity level was "warning", 1003 body bytes, 423 header bytes
这又是什么意思呢?谢谢。
[ 本帖最后由 lucklili 于 2008-4-16 13:41 编辑 ] 关注。。。 改为web_submit_data试一下
回复 3# 的帖子
我把web_submit_from 改成了web_submit_data,也是有问题,错误是:Action.c(36): Error -27225: The "NamePfx=ctl" argument (number 16) is not recognized within "ITEMDATA"
Action.c(36): web_submit_data("List.aspx") highest severity level was "ERROR", 0 body bytes, 0 header bytes
为什么会这样呢?又改回from,还是说只读的问题。是什么问题呢? 原帖由 iori 于 2008-4-16 11:23 发表 http://bbs.51testing.com/images/common/back.gif
改为web_submit_data试一下
我发现了一点小问题,不知道是不是这样。
日志错误说:Action.c(36): Error -27983: Attempting to modify "readonly" field "ctl00$ContentPlaceHolder1$txtDeptNo"
下面的是脚本:
web_submit_form("List.aspx",
"Snapshot=t12.inf",
ITEMDATA,
"Name=ctl00$ContentPlaceHolder1$txtApplyNo", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtPostName", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$txtRequirementDept", "Value=", ENDITEM,
"Name=checks", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"NamePfx=ctl", "Value=<OFF>", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnAdd", "Value=新增", ENDITEM,
脚本的第四行就是错误说到的“Attempting to modify "readonly" field "ctl00$ContentPlaceHolder1$txtDeptNo" ”
能从这里找出原因吗?我不知道为什么呢? 问题我知道怎么回事了,不过没有好的解决方法。
"Name=ctl00$ContentPlaceHolder1$txtApplyNo", "Value=", ENDITEM中的“txeapplyNO”是页面中一个只读的东西,这个编号是自动生成的,所以导致出现那个错误。可是后面输入的东西就回放不出来了,有什么方法可以解决吗? 以下是LR中关于Message Code 27983 的描述:
Attempting to modify "read-only" field 'form element'
Unable to modify the value of a read-only form element. Possible reasons for this error include: (i) The script was modified manually. (ii) The application changed since the script was recorded, and the field was either changed to read-only or its initial value was changed.
Troubleshooting
If the item was manually coded, remove it.
If the application changed, either change the value to the new value or remove the item.
因此,建议确认ctl00$ContentPlaceHolder1$txtDeptNo这个字段的值是否为只读的字段,以及该值是否是自己手工修改过?
另外,如果该值是自动生成且只读的,把这句代码注销看下结果。 原帖由 gp_jl 于 2008-4-16 13:42 发表 http://bbs.51testing.com/images/common/back.gif
以下是LR中关于Message Code 27983 的描述:
Attempting to modify "read-only" field 'form element'
Unable to modify the value of a read-only form element. Possible reasons for this error include: (i)...
谢谢你的回答
注销了以后,现在有了新的问题,注销之后还是回放不过去
错误变成了:
Action.c(36): Error -27983: Attempting to modify "readonly" field "ctl00$ContentPlaceHolder1$txtDeptNo"
Action.c(36): web_submit_form("List.aspx") highest severity level was "ERROR", 0 body bytes, 0 header bytes
而脚本里面没有"ctl00$ContentPlaceHolder1$txtDeptNo"
怎么办呢?头疼ing 问题终于解决了,又找到了一些感觉有问题的地方更改了,就解决了。谢谢大家! 楼主最终是怎么解决此问题的呢?能否共享一下,我也遇到此类问题了。谢谢 遇到同样问题,顶起。。
页:
[1]