51Testing软件测试论坛

标题: 求助LR高手:LR11.0录制上传文件时,无法生成上传文件的路径是什么原因 [打印本页]

作者: lucyxie    时间: 2012-12-19 20:29
标题: 求助LR高手:LR11.0录制上传文件时,无法生成上传文件的路径是什么原因
本帖最后由 thirfing 于 2013-5-13 10:14 编辑

LR高手:以下是我录制上传文件时,生成的部分脚本,请注意红色部分

web_submit_data("upload_5",
                "Action=http://192.168.1.3/group/10779/upload?p_p_id=20&p_p_lifecycle=1&p_p_state=pop_up&p_p_mode=view&_20_struts_action=%2Fdocument_library%2Fedit_file_entry",
                "Method=POST",
                "EncType=multipart/form-data",
                "RecContentType=text/html",
                "Referer=http://192.168.1.3/group/10779/upload?p_p_id=20&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&_20_struts_action=%2Fdocument_library%2Fedit_file_entry&_20_tabs2=version-history&_20_redirect=%2Fgroup%2F10779%2Fupload%3Fp_p_id%3D20%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D1%26_20_struts_action%3D%252Fdocument_library%252Fview%26_20_folderId%3D10904&_20_uploadProgressId=dlFileEntryUploadProgress&_20_folderId=10904",
                "Snapshot=t8.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=_20_cmd", "Value=add", ENDITEM,
                "Name=_20_redirect", "Value=/group/10779/upload?p_p_id=20&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_20_struts_action=%2Fdocument_library%2Fview&_20_folderId=10904", ENDITEM,
                "Name=_20_referringPortletResource", "Value=", ENDITEM,
                "Name=_20_uploadProgressId", "Value=dlFileEntryUploadProgress", ENDITEM,
                "Name=_20_folderId", "Value=10904", ENDITEM,
                "Name=_20_newFolderId", "Value=", ENDITEM,
                "Name=_20_name", "Value=", ENDITEM,
                "Name=_20_file", "Value=testA.txt", "File=Yes", ENDITEM, //这一段是我上传文件的部分,testA.txt是我上传的文档,但前面没有路径                "Name=_20_title", "Value=", ENDITEM,
                "Name=_20_description", "Value=", ENDITEM,
                LAST);


回放后,action部分报错

Action.c(105): Error -26488: Could not obtain information about submitted file "C:\Documents and Settings\Administrator\Local Settings\Temp\noname1\testA.txt": _stat32 rc=-1, errno=2 [No such file or directory]. Using an empty file          [MsgId: MERR-26488]
Action.c(105): Aborting pending download of URL="http://192.168.1.3/group/10779/upload?p_p_id=20&;p_p_lifecycle=1&p_p_state=pop_up&p_p_mode=view&_20_struts_action=%2Fdocument_library%2Fedit_file_entry"          [MsgId: MMSG-27656]
Action.c(105): Error -26366: "Text=文档上传下载" not found for web_reg_find          [MsgId: MERR-26366]
Action.c(105): Error -26374: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively.          [MsgId: MERR-26374]
Action.c(105): web_submit_data("upload_5") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]
作者: felix09049    时间: 2012-12-20 09:06
这个要梅径写明,要么把文件放到脚本文件夹里
作者: temp20121017    时间: 2013-5-3 09:40
我的直接没有 "Name=_20_file", "Value=testA.txt", "File=Yes", ENDITEM,




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