转:Warning -26490: File name in a multipart submit is missing or empty.解决方法

录制测试上传文件脚本,回放报Warning -26490: File name in a multipart submit is missing or empty. Using an empty file          [MsgId: MWAR-26490]。

经过几天努力,总算解决了此问题,先看以前的脚本:         web_submit_data("GeneralReport.aspx_2",

"Action=http://192.168.0.80/pbcmsc/GaiSuan/GeneralReport.aspx?taskid=0e1d66f8-4ecd-42a7-8f9e-e79f6733e992",

"Method=POST",

"EncType=multipart/form-data",

"RecContentType=text/html",

"Referer=http://192.168.0.80/pbcmsc/GaiSuan/GeneralReport.aspx?taskid=0e1d66f8-4ecd-42a7-8f9e-e79f6733e992",

"Snapshot=t11.inf",

"Mode=HTML",

ITEMDATA,

"Name=__EVENTTARGET", "Value=", ENDITEM,

"Name=__EVENTARGUMENT", "Value=", ENDITEM,

"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState6}", ENDITEM,

"Name=__EVENTVALIDATION", "Value=/wEWBQLi6rucCgKxyJGqCQLgqY6fBALq+76DCwLt3oXMA+v3KRNiiYlPYq+7WLq5K9a+OZs4", ENDITEM,

"Name=ddlVersion", "Value=送审版", ENDITEM,

"Name=txtBelongToPackage", "Value=GOOD-3", ENDITEM,

"Name=txtDemo", "Value=", ENDITEM,

"Name=fuPrj", "Value=F:""""test1.bwbd5", "File=Yes", ENDITEM,

"Name=mu2$multipFile", "Value=", "File=Yes", ENDITEM,

"Name=btnUpload", "Value=上传", ENDITEM,

"Name=dxpcCommonWinWS", "Value=1:1:12000:237:238:0:0:0", ENDITEM,

LAST);

通过了解web_submit_data函数及各参数,发现fuprj和mu2$multipFile都是上传附件的路径。我就想是不是fuprj第一个成功,mu2$multipFile为空是会失败,并报该错,给他赋值一个上传文件(mu2$multipFile的Value= F:""""test1.txt),结果二个都上传成功!

上一篇:生成ssl证书


下一篇:Matlab中reshape函数的使用