WT-262 and WT-263 created.

On 2/5/07, Marc Guillemot <[EMAIL PROTECTED]> wrote:

Hi Sven,

currently the file name is probably resolved from ... where ant is
started. Therefore it depends from your WebTest configuration.

Since my changes post release 2.1 the setFileField step should be
adapted to accept a File rather than a String for the fileName
attribute. This would allow Ant to resolve the path according to its
path resolution rules.

As long as WebTest is intended for functional tests, not to fake
responses, it doesn't make sense to perform the submit if the file
doesn't exist. Therefore the step should fail in such a case. This would
help while writing a test.

Can you open an issue for these 2 points?

Marc.

Sven Haiges wrote:
> HI all,
>
> I am quite new to webtest and try to test a form with a file upload
field.
>
> ...
> <clickButton label="Add new" />
> <verifyText description="New rows shows (no adpack) text" text="(no
> adPack)" />
> <setFileField name="multiparts[0].multipartFile" fileName="advert.aam"/>
> <clickButton label="OK" />
> <verifyText description="Back to advertisements list"
> text="Advertisements" />
>
> After OK is clicked, the message cannot be verified. From the responses,
> I can see taht no file was specified, that's why the form is not
submitted.
>
> I am unsure where the advert.aam File needs to go - that's why I copied
> it to several directories including the one in which the webtest is
> executed, the ant base directory, etc. I don't get any message from
> webtest telling me that the file was not found.
>
> Any ideas?
>
> Thanx!
> Sven
>
> --
> Sven Haiges
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
> Skype: hansamann
> Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
>
> Subscribe to the Grails Podcast:
> http://hansamann.podspot.de/rss

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest




--
Sven Haiges
[EMAIL PROTECTED]

Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de

Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss

Reply via email to