录制Flex上传FTP服务器找不到录制上传的路径 帮帮小妹吧 在线等
本帖最后由 irisfly89 于 2012-7-31 18:30 编辑使用的协议是HTTP和FLEX
web_reg_find("Text=申报单详情",
LAST);
lr_think_time(10);
web_url("distribute.do_2",
"URL=http://10.1.30.18:3030/purang-boms-web/distribute.do?method=viewYield&uploadImageFlag=2&batchId=20120730000005",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t68.inf",
"Mode=HTTP",
LAST);
/* Request with GET method to URL "http://10.1.30.18:3030/images/topbg.jpg" failed during recording. Server response : 404*/
lr_think_time(7);
flex_web_request("URSTelemetry.asmx",
"URL=https://telemetry.urs.microsoft.com/URSTelemetry.asmx?"
"MSTel-Client-Key=OKhnOb3UVdpj/XgzZ2zq0w%3d%3d&MSTel-Patented-Lock="
"T7SQLZg5NgI%3d",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t69.inf",
"Mode=HTTP",
"EncType=text/xml; charset=utf-8",
"Body=<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/"
"envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://"
"schemas.xmlsoap.org/soap/encoding/\"><soap:Body><TelRep xmlns=\"http:/"
"/Microsoft.Live.URSTelemetry/\"><Guid>"
"{2CEDBFBC-DBA8-43AA-B1FD-CC8E6316E3E2}</Guid><DV>8.0.6001.9</DV><FV"
">8.00.6001.18669</FV><OSV>5.1.2600.3.0</OSV><CN>zh-cn</CN><;PRG>"
"{0B77AEC5-866F-4572-988A-D599DD51AD06}</PRG><RType>;POST</RType><CID"
">FF36D521-E9B2-4EC0-8A14-A8D6E2FC70BF</CID><CTU>http://10.1.30.18/"
"purang-boms-web/distribute.do?method=viewYield&uploadImageFlag=2&"
"amp;batchId=20120730000005</CTU><CWIp>NULL</CWIp><TUIp>10.1.30.18</"
"TUIp><CS>64</CS><IB soapenc:arrayType=\"xsd:double\"><double>100</"
"double><double>100</double><double>75</double><double>100</double>"
"<double>6.5</double></IB><Frames xmlns:q1=\"http://"
"Microsoft.Live.URSTelemetry/\" soapenc:arrayType=\"q1:Frame\">"
"<Frame><FUrl>http://10.1.30.18/purang-boms-web/distribute.do?method="
"viewYield&uploadImageFlag=2&batchId=20120730000005</FUrl><Z"
">KVHN</Z><CR>32D32000|F0015|0|2000027C|FC0|0</CR><Kwds>3a003a00</Kwds>"
"<UType>TOP</UType><HIP>10.1.30.18</HIP></Frame></Frames></TelRep></"
"soap:Body></soap:Envelope>",
LAST);
web_submit_data("upload.do",
"Action=http://10.1.30.18:3030/purang-boms-web/upload.do?method=init&batchid=20120730000005",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.1.30.18:3030/purang-boms-web/distribute.do?method=viewYield&uploadImageFlag=2&batchId=20120730000005",
"Snapshot=t70.inf",
"Mode=HTTP",
ITEMDATA,
"Name=yield.batchId", "Value=20120730000005", ENDITEM,
LAST);
/* Request with GET method to URL "http://10.1.30.18:3030/purang-boms-web/history/history.css" failed during recording. Server response : 404*/
web_add_header("x-flash-version",
"11,3,300,268");
web_url("flexFTPWin.swf",
"URL=http://10.1.30.18:3030/purang-boms-web/flexUpload/flexFTPWin.swf",
"Resource=1",
"RecContentType=application/x-shockwave-flash",
"Referer=http://10.1.30.18:3030/purang-boms-web/upload.do?method=init&batchid=20120730000005",
"Snapshot=t71.inf",
LAST);
lr_start_transaction("SHANGCHUAN");
web_submit_data("upload.do_2",
"Action=http://10.1.30.18:3030/purang-boms-web/upload.do?method=saveImages&dataString=20120731/20120730000005/test02.jpg;&batchid=20120730000005",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.1.30.18:3030/purang-boms-web/upload.do?method=init&batchid=20120730000005",
"Mode=HTTP",
ITEMDATA,
"Name=fileName", "Value=20120731/20120730000005", ENDITEM,
"Name=batchid", "Value=20120730000005", ENDITEM,
LAST);
lr_end_transaction("SHANGCHUAN",LR_AUTO);
是录制的脚本
上传的文件名是test02.jpg 但是我想上传test03.jpg的时候 我发现上传了 是一个小差 没有上传上去 估计是找不到上传的本地地址的文件 不知道怎么处理 请大家帮助 确保文件在你可以访问到的路径,参数化上传文件地址就行了,不过既然是Ftp上传的,那么你就别管用LR去做脚本了,直接写个FTP上传不就行了。。。 回复 2# 云层
小妹愚笨 不懂其中意思 小妹要实现的是模拟 特定网速上传文件 看上传的情况怎样。会不会有卡或者其他情况发生 是通过系统上传的其中点击按钮上传文件 是用的FLEX中的上传功能 希望能模拟这一场景 你flex上传ftp本质上只是另外一个Client上传ftp,你直接模拟ftp连接就行了,flex这边当做一个功能来做就行了
flash本身上传你脚本貌似做不出来 回复 4# 云层
小妹比较笨,理解的意思就是 让我用LR中模拟FTP上传写一个脚本。 就是这样 谢谢 我开始写了
页:
[1]