My only additional note would be to try to stay away from camelCase names for the functions ... the normal syntax way to do things is
file_field ... not fileField ...
the camelCase names are slated to be removed in a future revision.
j.
On 12/15/05, Bill Agee <[EMAIL PROTECTED]> wrote:
I think file fields are treated as a different type of object than text fields.But you should be able to set file fields using 'fileField'...here's an example from the "filefield_test.rb" WATIR unit test:$ie.fileField(:name,"file1").set($htmlRoot + "fileupload.html")Using this has worked fine for me so far, at least for for simple file uploads.Thanks
Bill-----Original Message-----
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, December 15, 2005 11:30 AM
To: [email protected]
Subject: [Wtr-general] How to manipulate attaching filesI may have posted twice. Looks like the first one did not make it through.I have web application that requires attaching a file very similar to attaching a file in Yahoo mail. Rather than manipulating the attach button, navigating to the file and attaching it, I thought I would use a short cut by writing directly into the text field the path to the file. However, using this approach returns an UnknownObjectException.To illustrate, I'm using the text field methodie.text_field(:name, "typeinme").set("some text")<input type = "text" name = "typeinme" >However, in my html reads like this:<input type = "file" name = "typeinme" >Does anybody have any ideas how to solve this problem?
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
