|
7#
楼主 |
发表于 2008-7-3 16:34:17
|
只看该作者
改正后的脚本如下:
#include "web_api.h"
Action()
{
web_reg_find("Text=澳中銀公司客戶關係管理系統",
LAST);
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 3
// {JSESSIONID2} = "B3324B4A77625CAFB8E145F3E6026232?action=authLogin"
// */
web_reg_save_param("JSESSIONID2",
"LB/IC=jsessionid=",
"RB/IC=\"",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
// [WCSPARAM WCSParam_Diff1 32 B3324B4A77625CAFB8E145F3E6026232] Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff1", "LB=jsessionid=", "RB=?", "Ord=1", "Search=Body", "RelFrameId=1", LAST );
web_url("cms",
"URL=http://www.yitong.com.cn:8083/cms",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/cms/page/images/bg01.gif", "Referer=http://www.yitong.com.cn:8083/cms/", ENDITEM,
LAST);
lr_think_time( 7 );
web_reg_find("Text=澳中銀公司客戶關係管理系統",
LAST);
web_reg_find("Text=頂層菜單欄",
LAST);
web_reg_find("Text=左菜單欄",
LAST);
web_submit_data("login.shtml;jsessionid={WCSParam_Diff1}",
"Action=http://www.yitong.com.cn:8083/cms/login.shtml;jsessionid={JSESSIONID2}",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://www.yitong.com.cn:8083/cms/",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=usrId", "Value=admin", ENDITEM,
"Name=usrPwd", "Value=admin", ENDITEM,
"Name=verifycode", "Value=", ENDITEM,
"Name=x", "Value=0", ENDITEM,
"Name=y", "Value=0", ENDITEM,
EXTRARES,
"Url=page/images/dh-bg.jpg", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/top.html", ENDITEM,
"Url=page/images/t-bg.jpg", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/top.html", ENDITEM,
"Url=page/images/splitter_bg.gif", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/adjust.jsp", ENDITEM,
"Url=assets/tasknode.css", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
LAST);
web_submit_data("notes.shtml",
"Action=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=countTask&type=1",
"Method=POST",
"TargetFrame=",
"RecContentType=text/plain",
"Referer=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=first",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("notes.shtml_2",
"Action=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=countTask&type=3",
"Method=POST",
"TargetFrame=",
"RecContentType=text/plain",
"Referer=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=first",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("notes.shtml_3",
"Action=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=countTask&type=6",
"Method=POST",
"TargetFrame=",
"RecContentType=text/plain",
"Referer=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=first",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("notes.shtml_4",
"Action=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=countTask&type=8",
"Method=POST",
"TargetFrame=",
"RecContentType=text/plain",
"Referer=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=first",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("notes.shtml_5",
"Action=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=countTask&type=7",
"Method=POST",
"TargetFrame=",
"RecContentType=text/plain",
"Referer=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=first",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("notes.shtml_6",
"Action=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=countTask&type=2",
"Method=POST",
"TargetFrame=",
"RecContentType=text/plain",
"Referer=http://www.yitong.com.cn:8083/cms/system/notes.shtml?action=first",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
EXTRARES,
"Url=../plugins/YahooUI/yahoo-min.js", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../plugins/YahooUI/event-min.js", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../plugins/YahooUI/dom-min.js", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../plugins/YahooUI/logger-min.js", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../plugins/YahooUI/treeview-min.js", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../page/images/changeuser.gif", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../page/images/cd000.jpg", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../page/images/background.gif", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../plugins/YahooUI/treeview/assets/sprite-menu.gif", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
"Url=../plugins/YahooUI/treeview/assets/treeview-loading.gif", "Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002", ENDITEM,
LAST);
web_reg_find("Text=My JSP '070102_Q.jsp' starting page",
LAST);
web_url("T0601.shtml",
"URL=http://www.yitong.com.cn:8083/cms/operation/T0601.shtml?action=toQuery",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002",
"Snapshot=t9.inf",
"Mode=HTML",
EXTRARES,
"Url=../plugins/YahooUI/connection-min.js", "Referer=http://www.yitong.com.cn:8083/cms/operation/T0601.shtml?action=toQuery", ENDITEM,
LAST);
lr_think_time( 3 );
web_reg_find("Text=帶分頁的報表",
LAST);
web_submit_data("T0601.shtml_2",
"Action=http://www.yitong.com.cn:8083/cms/operation/T0601.shtml?action=toList",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://www.yitong.com.cn:8083/cms/operation/T0601.shtml?action=toQuery",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=sysdate", "Value=2007/03", ENDITEM,
"Name=cifn", "Value=", ENDITEM,
"Name=cifk", "Value=", ENDITEM,
"Name=chnname", "Value=", ENDITEM,
"Name=custname", "Value=", ENDITEM,
"Name=CUBK", "Value=", ENDITEM,
"Name=rptno", "Value=", ENDITEM,
"Name=occubusi", "Value=", ENDITEM,
"Name=cuty", "Value=", ENDITEM,
"Name=putoccu", "Value=", ENDITEM,
"Name=area", "Value=", ENDITEM,
"Name=sizeclas", "Value=", ENDITEM,
"Name=curank", "Value=", ENDITEM,
"Name=mkagent", "Value=", ENDITEM,
"Name=usrId", "Value=", ENDITEM,
"Name=Submit", "Value=查 詢", ENDITEM,
LAST);
lr_think_time( 6 );
web_reg_find("Text=My JSP '070102_Q.jsp' starting page",
LAST);
web_url("T0602.shtml",
"URL=http://www.yitong.com.cn:8083/cms/operation/T0602.shtml?action=toQuery",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.yitong.com.cn:8083/cms/page/jsp/index/left.jsp?falg=002",
"Snapshot=t11.inf",
"Mode=HTML",
EXTRARES,
"Url=../plugins/YahooUI/connection-min.js", "Referer=http://www.yitong.com.cn:8083/cms/operation/T0602.shtml?action=toQuery", ENDITEM,
LAST);
lr_think_time( 7 );
web_reg_find("Text=帶分頁的報表",
LAST);
web_submit_data("T0602.shtml_2",
"Action=http://www.yitong.com.cn:8083/cms/operation/T0602.shtml?action=toList",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://www.yitong.com.cn:8083/cms/operation/T0602.shtml?action=toQuery",
"Snapshot=t12.inf",
"Mode=HTML",
ITEMDATA,
"Name=acno", "Value=0023660855", ENDITEM,
"Name=stadate", "Value=2007/03", ENDITEM,
"Name=duedate", "Value=2008/03", ENDITEM,
"Name=Submit", "Value=查 詢", ENDITEM,
LAST);
lr_think_time( 1 );
web_reg_find("Text=退出系統",
LAST);
web_url("logout.jsp",
"URL=http://www.yitong.com.cn:8083/cms/page/jsp/index/logout.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t13.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=澳中銀公司客戶關係管理系統",
LAST);
web_url("login.jsp",
"URL=http://www.yitong.com.cn:8083/cms/page/jsp/index/login.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t14.inf",
"Mode=HTML",
EXTRARES,
"Url=/cms/page/images/bg01.gif", ENDITEM,
LAST);
return 0;
}
但是仍然报错,错误如下:
Action.c(165): Error -26627: HTTP Status-Code=404 (/cms/operation/a.html) for "http://www.yitong.com.cn:8083/cms/operation/a.html" [MsgId: MERR-26627]
Action.c(165): Error -26627: HTTP Status-Code=404 (/cms/operation/a.html) for "http://www.yitong.com.cn:8083/cms/operation/a.html"
Action.c(165): web_submit_data("T0601.shtml_2") highest severity level was "ERROR", 49798 body bytes, 681 header bytes, 53 chunking overhead bytes [MsgId: MMSG-26387] |
|