51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3677|回复: 10
打印 上一主题 下一主题

[原创] 对于录制只读的控件,如何能正常录制?因为在只读这里总是报错。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-4-16 10:58:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1、
Action.c(29): web_link("技术类(时间资源)") was successful, 46169 body bytes, 1463 header bytes          [MsgId: MMSG-26386]
Action.c(36): Error -27983: Attempting to modify "readonly" field "ctl00$ContentPlaceHolder1$txtDeptNo"          [MsgId: MERR-27983]
Action.c(36): web_submit_form("List.aspx") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]
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=/"
                "wEPDwUKMTM5NjQ4NzE4OQ9kFgJmD2QWAmYPZBYKZg8WAh4Dc3JjBScvaVBTQVJSRC9Db21tb24vSW1nL2lvYV9zaXRlbG9nb19lbi5naWZkAgMPZBYCAgEPZBYCAgEPFgIfAAUcL2lQU0FSUkQvQ29tbW9uL0ltZy9zaGltLmdpZmQCBA9kFgJmD2QWAgIBDw8WAh4EVGV4dAUX5pys5ZGo5Li65LuK5bm056ysMTblkahkZAIFD2QWAmYPZBYCZg9kFgJmD2QWBAIBD2QWAgIBD2QWAmYPZBYCAgEPDxYCHgZJc1ZpZXdoZBYaAgEPDxYCHgdWaXNpYmxlaGQWBgIFDw8WAh8DaGQWAgIBDzwrAAsAZAIJDw8WAh8DaGQWAgIBDxYCHwNoFgICAQ9kFgICAQ8QZGQWAGQCCw8WAh8DZ2QCAg8PFgIfA2hkZAIDDxAPFgIfA2hkZGRkAgUPDxYCHwNoZGQCBg8PFgIfA2hkZAIHDw8WAh8"
                "DaBYCHgdvbmNsaWNrBQ93aW5kb3cuY2xvc2UoKTtkAggPDxYCHwNnFgQfBAUfaWYoIUNoZWNrU3VibWl0KCkpcmV0dXJuIGZhbHNlOx4Kb25kYmxjbGljawUNcmV0dXJuIGZhbHNlO2QCCQ8PFgIfA2gWBB8EBR5pZighQ2hlY2tBZ3JlZSgpKXJldHVybiBmYWxzZTsfBQUNcmV0dXJuIGZhbHNlO2QCCg8PFgIfA2hkZAILDw8WAh8DZxYEHwQFHWlmKCFDaGVja1NhdmUoKSlyZXR1cm4gZmFsc2U7HwUFDXJldHVybiBmYWxzZTtkAgwPDxYCHwNoFgIfBAUhaWYgKCFDaGVja1JlamVjdCgpKSByZXR1cm4gZmFsc2U7ZAINDw8WAh8DaBYEHwQFIGlm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If"
                "A2hkFgICAQ88KwALAGQCCQ8PFgIfA2hkFgICAQ8WAh8DaBYCAgEPZBYCAgEPEGRkFgBkAgsPFgIfA2dkAgIPDxYCHwNoZGQCAw8QDxYCHwNoZGRkZAIFDw8WAh8DaGRkAgYPDxYCHwNoZGQCBw8PFgIfA2gWAh8EBQ93aW5kb3cuY2xvc2UoKTtkAggPDxYCHwNnFgQfBAUfaWYoIUNoZWNrU3VibWl0KCkpcmV0dXJuIGZhbHNlOx8FBQ1yZXR1cm4gZmFsc2U7ZAIJDw8WAh8DaBYEHwQFHmlmKCFDaGVja0FncmVlKCkpcmV0dXJuIGZhbHNlOx8FBQ1yZXR1cm4gZmFsc2U7ZAIKDw8WAh8DaGRkAgsPDxYCHwNnFgQfBAUdaWYoIUNoZWNrU2F2ZSgpKXJldHVybiBmYWxzZTsfBQUNcmV0dXJuIGZhbHNlO2QCDA8PFgIfA2gWAh8EBSFpZiAoIUNoZWNrUmVqZWN0KCkpIHJldH"
                "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" %>"          [MsgId: MWAR-26631]
Action.c(4): web_url("SpecialEntrance.aspx") highest severity level was "warning", 1003 body bytes, 423 header bytes          [MsgId: MMSG-26388]


这又是什么意思呢?谢谢。

[ 本帖最后由 lucklili 于 2008-4-16 13:41 编辑 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2008-4-16 11:08:10 | 只看该作者
关注。。。
回复 支持 反对

使用道具 举报

  • TA的每日心情

    2016-12-30 10:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]测试排长

    3#
    发表于 2008-4-16 11:23:40 | 只看该作者
    改为web_submit_data试一下
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
     楼主| 发表于 2008-4-16 11:35:30 | 只看该作者

    回复 3# 的帖子

    我把web_submit_from 改成了web_submit_data,也是有问题,错误是:
    Action.c(36): Error -27225: The "NamePfx=ctl" argument (number 16) is not recognized within "ITEMDATA"          [MsgId: MERR-27225]
    Action.c(36): web_submit_data("List.aspx") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]

    为什么会这样呢?又改回from,还是说只读的问题。是什么问题呢?
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
     楼主| 发表于 2008-4-16 11:38:42 | 只看该作者
    原帖由 iori 于 2008-4-16 11:23 发表
    改为web_submit_data试一下



    我发现了一点小问题,不知道是不是这样。
    日志错误说:Action.c(36): Error -27983: Attempting to modify "readonly" field "ctl00$ContentPlaceHolder1$txtDeptNo"          [MsgId: MERR-27983]

    下面的是脚本:
            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" ”
    能从这里找出原因吗?我不知道为什么呢?
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
     楼主| 发表于 2008-4-16 13:40:34 | 只看该作者
    问题我知道怎么回事了,不过没有好的解决方法。
      "Name=ctl00$ContentPlaceHolder1$txtApplyNo", "Value=", ENDITEM中的“txeapplyNO”是页面中一个只读的东西,这个编号是自动生成的,所以导致出现那个错误。可是后面输入的东西就回放不出来了,有什么方法可以解决吗?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2015-11-17 09:09
  • 签到天数: 7 天

    连续签到: 1 天

    [LV.3]测试连长

    7#
    发表于 2008-4-16 13:42:20 | 只看该作者
    以下是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这个字段的值是否为只读的字段,以及该值是否是自己手工修改过?
    另外,如果该值是自动生成且只读的,把这句代码注销看下结果。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    8#
     楼主| 发表于 2008-4-16 15:16:09 | 只看该作者
    原帖由 gp_jl 于 2008-4-16 13:42 发表
    以下是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"          [MsgId: MERR-27983]
    Action.c(36): web_submit_form("List.aspx") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]
    而脚本里面没有"ctl00$ContentPlaceHolder1$txtDeptNo"

    怎么办呢?头疼ing
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    9#
     楼主| 发表于 2008-4-16 17:00:03 | 只看该作者
    问题终于解决了,又找到了一些感觉有问题的地方更改了,就解决了。谢谢大家!
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    10#
    发表于 2008-5-30 09:50:36 | 只看该作者
    楼主最终是怎么解决此问题的呢?能否共享一下,我也遇到此类问题了。谢谢
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    11#
    发表于 2009-6-25 13:45:15 | 只看该作者
    遇到同样问题,顶起。。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-19 08:35 , Processed in 0.079770 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表