51Testing软件测试论坛

标题: 关于录制超连接的问题 [打印本页]

作者: Joan2005    时间: 2007-1-29 13:41
标题: 关于录制超连接的问题
如图,已经做了关联.但回放时总出错.
不知道是什么原因

代码如下:
Action()
{
        web_url("GCGL",
                "URL=http://172.23.163.182/GCGL/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=images/a001.gif", ENDITEM,
                LAST);
        web_reg_save_param("currenttaskid",
                       "LB=taskid=",
                       "RB=",
                       LAST);
       
        web_submit_form("ALogin.aspx",
                "Snapshot=t2.inf",
                ITEMDATA,
                "Name=TxtUser", "Value=yusuanyuan01", ENDITEM,
                "Name=TxtPassword", "Value=1", ENDITEM,
                "Name=ImageButton1.x", "Value=0", ENDITEM,
                "Name=ImageButton1.y", "Value=0", ENDITEM,
                EXTRARES,
                "Url=images/default_r10_c2_2.jpg", "Referer=http://172.23.163.182/GCGL/main/main.aspx", ENDITEM,
                "Url=images/default_r10_c2OnOver.jpg", "Referer=http://172.23.163.182/GCGL/main/main.aspx", ENDITEM,
                "Url=images/default_r10_c2_2OnOver.jpg", "Referer=http://172.23.163.182/GCGL/main/main.aspx", ENDITEM,
                "Url=images/n003.gif", "Referer=http://172.23.163.182/GCGL/main/main.aspx", ENDITEM,
                "Url=images/n005.gif", "Referer=http://172.23.163.182/GCGL/main/main.aspx", ENDITEM,
                "Url=Menu/images/a-4.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-30.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/controlpanel.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-29.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/copy.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-5.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-10.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-8.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-2.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-17.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-11.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-25.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-1.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/systeminfo.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-18.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-6.GIF", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/a-13.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=Menu/images/top_level_bg.gif", "Referer=http://172.23.163.182/GCGL/Menu/toolbar.aspx", ENDITEM,
                "Url=images/b017.gif", "Referer=http://172.23.163.182/GCGL/main/WorkTable.aspx", ENDITEM,
                "Url=styles/CommonInput.htc", "Referer=http://172.23.163.182/GCGL/main/WorkTable.aspx", ENDITEM,
                LAST);
        lr_output_message("currenttaskid is :%s",lr_eval_string("{currenttaskid}"));

        web_link("处理",
                "Text=处理",
                "Ordinal=19",
                "Snapshot=t3.inf",
                EXTRARES,
                "Url=../styles/CommonInput.htc", "Referer=", ENDITEM,
                "Url=../images/17.gif", "Referer=http://172.23.163.182/GCGL/Activity/BudgetInput.aspx?taskid={currenttaskid}", ENDITEM,
                "Url=../images/btn.gif", "Referer=http://172.23.163.182/GCGL/Activity/BudgetInput.aspx?taskid={currenttaskid}", ENDITEM,
                LAST);


        web_submit_form("BudgetInput.aspx",
                "Snapshot=t4.inf",
                ITEMDATA,
                "Name=txt_TASKNAME", "Value=1", ENDITEM,
                "Name=txt_CustomerName", "Value=1", ENDITEM,
                "Name=txt_Linkman", "Value=1", ENDITEM,
                "Name=txt_LinkTel", "Value=1", ENDITEM,
                "Name=txt_TASKADDRESS", "Value=1", ENDITEM,
                "Name=txt_TASKREMARK", "Value=1", ENDITEM,
                "Name=radlst_BUDGETTYPE", "Value=10KV&20KV", ENDITEM,
                "Name=txt_BudgetTotal1", "Value=1.00", ENDITEM,
                "Name=txt_BudgetMaterial1", "Value=1.00", ENDITEM,
                "Name=txt_BudgetManValue1", "Value=1.00", ENDITEM,
                "Name=txt_BudgetBaseDirect1", "Value=1.00", ENDITEM,
                "Name=btn_Save", "Value=", ENDITEM,
                EXTRARES,
                "Url=../styles/CommonInput.htc", "Referer=", ENDITEM,
                "Url=../images/17.gif", "Referer=http://172.23.163.182/GCGL/Activity/BudgetInput.aspx?taskid={currenttaskid}", ENDITEM,
                "Url=../images/btn.gif", "Referer=http://172.23.163.182/GCGL/Activity/BudgetInput.aspx?taskid={currenttaskid}", ENDITEM,
                LAST);

        web_submit_form("BudgetInput.aspx_2",
                "Snapshot=t5.inf",
                ITEMDATA,
                "Name=txt_TASKNAME", "Value=1", ENDITEM,
                "Name=txt_CustomerName", "Value=1", ENDITEM,
                "Name=txt_Linkman", "Value=1", ENDITEM,
                "Name=txt_LinkTel", "Value=1", ENDITEM,
                "Name=txt_TASKADDRESS", "Value=1", ENDITEM,
                "Name=txt_TASKREMARK", "Value=1", ENDITEM,
                "Name=radlst_BUDGETTYPE", "Value=10KV&20KV", ENDITEM,
                "Name=txt_BudgetTotal1", "Value=1.00", ENDITEM,
                "Name=txt_BudgetMaterial1", "Value=1.00", ENDITEM,
                "Name=txt_BudgetManValue1", "Value=1.00", ENDITEM,
                "Name=txt_BudgetBaseDirect1", "Value=1.00", ENDITEM,
                "Name=wf1$BtnNext", "Value=下 传", ENDITEM,
                LAST);

        web_url("WorkTable.aspx",
                "URL=http://172.23.163.182/GCGL/Main/WorkTable.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t6.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/b017.gif", ENDITEM,
                LAST);

        return 0;


回放错误如下:
Action.c(56): Error -27995: Requested link ("Text=处理") not found          [MsgId: MERR-27995]
Action.c(56): web_link("处理") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388
]

[ 本帖最后由 Joan2005 于 2007-2-8 14:30 编辑 ]
作者: Koffer    时间: 2007-1-29 15:50
web_link,这个函数大家好像都有问题
web_image,也是类似的问题。
作者: Joan2005    时间: 2007-2-8 14:30
换了url_based录制,解决了该问题.




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2