51Testing软件测试论坛

标题: 我是新手,求大家帮忙 [打印本页]

作者: xxmao163    时间: 2005-3-30 09:40
标题: 我是新手,求大家帮忙
我录制了一段b/s的脚本,就是添加一段用户信息,然后保存,运行脚本时老出现:action.c(73): Error -27208: The "Name" argument (number 18) has already been specified in argument number 16          [MsgId: MERR-27208]
Action.c(73): web_submit_form("ECMUserMaint.html") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MERR-27208]


这是什么意思,怎么解决然,而别人录制的同样的脚本,到我这运行没问题,请帮忙,在线等.
作者: tacy_lee    时间: 2005-3-30 10:22
脚本贴出来
作者: xxmao163    时间: 2005-3-30 13:08
#include "web_api.h"


Action()
{
        web_url("ECMCorpMgmtLogin.html",
                "URL=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtLogin.html",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/login_6.gif", ENDITEM,
                LAST);

        lr_think_time( 10 );

        web_submit_data("ECMCorpMgmtLogin.html_2",
                "Action=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtLogin.html",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtLogin.html",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=UserID", "Value=liu", ENDITEM,
                "Name=UserPassword", "Value=111111", ENDITEM,
                "Name=ECMCorpMgmtLogin_action", "Value=Login", ENDITEM,
                "Name=CompID", "Value=ECMCorpMgmtLogin", ENDITEM,
                "Name=CompName", "Value=ECMCorpMgmtLoginName", ENDITEM,
                "Name=Login.x", "Value=0", ENDITEM,
                "Name=Login.y", "Value=0", ENDITEM,
                LAST);

        web_submit_form("ECMCorpMgmtMain.html",
                "Snapshot=t7.inf",
                ITEMDATA,
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/top_bg.jpg", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtTop.html", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/left_bg.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtLeft.html", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/dot_4.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtLeft.html", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/dot_6.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpMgmtLeft.html", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic2.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpInfoMaint.html", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic5.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpInfoMaint.html", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic4.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMCorpInfoMaint.html", ENDITEM,
                LAST);


        /*
         * 显示部门列表
         */

/*        lr_think_time( 3 );

        web_link("閮ㄩ棬鍒楄〃",
                "Text=閮ㄩ棬鍒楄〃",
                "Snapshot=t4.inf",
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic2.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgList.html?clearCache=true", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic5.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgList.html?clearCache=true", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic4.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgList.html?clearCache=true", ENDITEM,
                LAST);*/

        lr_think_time( 6 );

        /*
         * 添加部门
         */

        lr_think_time( 3 );

        web_link("娣诲姞閮ㄩ棬",
                "Text=娣诲姞閮ㄩ棬",
                "Snapshot=t5.inf",
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic5.gif", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic2.gif", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic4.gif", ENDITEM,
                LAST);

        web_link("娣诲姞閮ㄩ棬_2",
                "Text=娣诲姞閮ㄩ棬",
                "Snapshot=t6.inf",
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic2.gif", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic5.gif", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic4.gif", ENDITEM,
                LAST);

        lr_think_time( 44 );
/*          web_submit_form("ECMCorpMgmtMain.html",
                "Snapshot=t3.inf",
                ITEMDATA,
                EXTRARES,*/
        web_submit_form("ECMOrgMaint.html",
                "Snapshot=t7.inf",
                ITEMDATA,
                "Name=ECMOrgMaint_OrgParentID", "Value=---", ENDITEM,
                "Name=ECMOrgMaint_OrgName", "Value=ann", ENDITEM,
                "Name=ECMOrgMaint_OrgCode", "Value=123", ENDITEM,
                "Name=ECMOrgMaint_OrgRank", "Value=1" ENDITEM,
                "Name=ECMOrgMaint_OrgDirector", "Value=wang", ENDITEM,
                "Name=ECMOrgMaint_OrgDuty", "Value=wu" ENDITEM,
                "Name=ECMOrgMaint_OrgDescription", "Value=nihao", ENDITEM,
                "Name=ECMOrgMaint_SubOrgs", "Value=0", ENDITEM,
                "Name=Submit", "Value=淇濆瓨", ENDITEM,
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic2.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgMaint.html?ECMOrgMaint_action=add", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic5.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgMaint.html?ECMOrgMaint_action=add", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic4.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgMaint.html?ECMOrgMaint_action=add", ENDITEM,
                LAST);

        lr_think_time( 6 );

        /*
         * 显示部门
         

        lr_think_time( 4 );

        web_link("閮ㄩ棬鍒楄〃_2",
                "Text=閮ㄩ棬鍒楄〃",
                "Snapshot=t8.inf",
                EXTRARES,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic2.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgList.html?clearCache=true", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic5.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgList.html?clearCache=true", ENDITEM,
                "Url=/ECManager/CorpMgmtResourceSet/images/right_pic4.gif", "Referer=http://www.liuwl02.com:5000/ECManager/CorpMgmtPortal/portal/html/ECMOrgList.html?clearCache=true", ENDITEM,
                LAST);*/

        return 0;
作者: xxmao163    时间: 2005-3-30 13:18
显示的错误行数是:96行,提示错误内容见每一贴.
作者: tacy_lee    时间: 2005-3-30 15:07
脚本是不是手动改过,看不出什么错误,错误信息提示你是有变量被重复定义
作者: xxmao163    时间: 2005-3-30 16:08
没有改过呀,就是直接录制的,回入就这样,重录了几次.
作者: xxmao163    时间: 2005-3-30 16:08
都是这个提示.




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