[Webtest] Re: Help with File Upload
Marc Guillemot
webtest@lists.canoo.com
Tue, 05 Oct 2004 16:15:03 +0200
You have to use the undocumented (because without test coverage) step setfilefield instead of setinputfield as
mentionned in:
http://lists.canoo.com/pipermail/webtest/2004q3/002415.html
Marc.
Terry Jahelka wrote:
> Hello,
>
> I'm very new to webtest and can't seem to get past a file upload problem.
> I've read the archives about file upload, but I'm still confused.
>
> My xml looks like:
>
> - <!-- File Upload
> -->
> <verifytitle stepid="Verify file upload title" text="${title.upload}" />
> <setinputfield stepid="set file" name="theFile" value="G:\GDP\ATF\File
> Upload CHIA.csv" />
> <setinputfield stepid="set email" name="fileUploadRequest.emailAddress"
> value="${atf.email}" />
> <clickbutton label="Submit" stepid="Click the submit button" />
>
> File exists at the location specified. When I run this I get:
>
> I get the following error:
>
> Test step clickbutton named "Click the submit button" failed with message
> "Illegal parameter theFile in form [fileUploadForm, post,
> /Sims/fileUploadAction.do, , , _top, , POST request for
> (http://gdpdev.rmtc.fedex.com:8111/Sims/fileUpload.jsp)
> /Sims/fileUploadAction.do] with message <Attempted to assign to parameter
> 'theFile' the extraneous value 'G:\GDP\ATF\File Upload CHIA.csv'.> "
>
> Is there a simple way to do this?
>
> Thanks!