3 messages in com.canoo.lists.webtestRE: [Webtest] Support for uploading a...
FromSent OnAttachments
EPu...@upstate.com09 Oct 2002 14:08 
Stefan G. Renz10 Oct 2002 05:49 
EPu...@upstate.com10 Oct 2002 06:25 
Subject:RE: [Webtest] Support for uploading a file?
From:EPu...@upstate.com (EPu@upstate.com)
Date:10/10/2002 06:25:17 AM
List:com.canoo.lists.webtest

Stef, Thanks for your reply.. I looked into httpunit, and was looking at the Canoo SetInputField.java class... It seems that a SetFileField or SetInputFileField could be created relatively simply.. It looks (from some sample code) like all I need to do is:

webform.getRequest("form").setParameter("file",new UploadFileSpec[] {new UploadFileSpec(theTestFile)});

However, my understanding of HTTPUnit and Canoo is too limited to figure it all out.. I looked at the Test case for the UploadFile code in httpunit, and it seems relatively straight forward.. But getting my "canoo" knowledge on top may take a while.

Thanks again, and if anyone has any other testing suggestions, I would love to hear them... Eric

-----Original Message----- From: Stefan G. Renz [mailto:Stef@web.de] Sent: Thursday, October 10, 2002 8:50 AM To: webt@lists.canoo.com; EPu@upstate.com Subject: Re: [Webtest] Support for uploading a file?

On Wednesday 09 October 2002 23:09, EPu@upstate.com wrote:

Hi all,

I looked over the docs, so I expect this to be a negative result, but is there anyway to test a page that requires uploading a file? I was looking at the setinputfield tag, but couldn't get it to pass a file, I guess because HTTPUnit doesn't support file uploads?

HttpUnit _does_ support file uploads...

Are there any other cool tricks around this issue?

Ciao Stef