[Webtest] New extension step: setinputfile

Marc Guillemot webtest@lists.canoo.com
Sun, 04 Jul 2004 17:56:03 +0200


I've added the step "setinputfile" that allows to set an <input type="file"...> field.

The step doesn't appear in the doc because it is only in the "extension area". It can't currently be in the normal place 
because it doesn't have any associated test. Such a test would require to parse a multipart request what can easily be 
done with additional packages (like jakarta commons-fileupload) but I don't want to add it to Webtest as long as clear 
separation of packages needed for runtime and those needed only for test purposes has not be made.

The file is not buffered before beeing set in the form as it is currently the case in the setXXX steps but directly set.


<setinputfile name="theNameOfTheFileInputField" file="/the/path/to/the/file"/>

One day it will be a fully documented and slef testing step, but perhaps can it be usefull "as it" in the mean time.