Re: issue in vugen script - unable to upload file

349 views
Skip to first unread message

James Pulley

unread,
Feb 12, 2013, 11:31:10 PM2/12/13
to LR-Loa...@googlegroups.com
Default search context for an added file, which is then stored in the se directory as the rest of the script components, would be (2).  No dot or backslash notation would be required.   Pathing would only be required in the case of a file located external to the script default directory 




On Feb 11, 2013, at 11:05 PM, Saumi <saum...@gmail.com> wrote:

I am recording a scenario which requires a file to be uploaded from file system but I am unable to simulate uploading the file using loadrunner script

Errors:
1. Warning in replay log: File name in a multipart submit is missing or empty. Using an empty file
2. Error in application during replay: Please upload file

Based on the above observations, I have concluded that the file is not being uploaded through the script
Protocol used: Web(HTTP/HTML)

web_submit_data has recorded the following code for uploading the file


web_submit_data("iframeUpload.xhtml_2",
        "Action=https://****/iframeUpload.xhtml",
        "Method=POST",
        "EncType=multipart/form-data",
        "TargetFrame=",
        "RecContentType=text/html",
        "Referer=https://*****/iframeUpload.xhtml",
        "Snapshot=t10.inf",
        "Mode=HTML",
        ITEMDATA,
        "Name=consultantList", "Value=2", ENDITEM,
        "Name=ActionStatus", "Value=", ENDITEM,
        "Name=TaskExeId", "Value=", ENDITEM,
        "Name=Assignee", "Value=", ENDITEM,
        "Name=TaskName", "Value=", ENDITEM,
        "Name=Version", "Value=", ENDITEM,
        "Name=procInstId", "Value=", ENDITEM,
        "Name=reqSubtype", "Value=", ENDITEM,
        "Name=saveDraftId", "Value=", ENDITEM,
        "Name=sourcePage", "Value=iframe", ENDITEM,
        "Name=requestStatus", "Value=", ENDITEM,
        "Name=massupdate:focusOnload", "Value=1,0", ENDITEM,
        "Name=autoScroll", "Value=", ENDITEM,
        "Name=massupdate:consultantECWAList:1:MassECFormsUpload:0:massECForms", "Value=.\\QCM-Mass_COS.pdf", "File=Yes", ENDITEM,
        "Name=massupdate_SUBMIT", "Value=1", ENDITEM,
        "Name=javax.faces.ViewState", "Value={lrCorr_ViewState_iFrameUpload2}", ENDITEM,
        "Name=consultantEmpNumb", "Value=63172", ENDITEM,
        "Name=index", "Value=0", ENDITEM,
        "Name=onUpload", "Value=true", ENDITEM,
        "Name=massupdate:_idcl", "Value=massupdate:consultantECWAList:1:MassECFormsUpload:0:massECFormsUpload", ENDITEM,
        LAST);

I am trying to upload a pdf file. I have added the file to the loadrunner script by File-> Add files to script.

Have tried the following variations:
1. Value=.\\QCM-Mass_COS.pdf
2. Value=QCM-Mass_COS.pdf
3. Value=D:\\\\QCM-Mass_COS.pdf - (recorded value)

Suggestions are welcome! :)

--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bhushan Deodhar

unread,
Feb 14, 2013, 1:34:12 PM2/14/13
to LR-Loa...@googlegroups.com
Place the file in the script folder. The other option could be writing a code that could set up ftp connection if the file is placed on another location which supports ftp connection
Reply all
Reply to author
Forward
0 new messages