Title: Message
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 files

I 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 method
 
ie.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

Reply via email to