Hi,
    I  tried with  
    path = "C\:Watir\Text.doc"

    ie.file_field(:value,'Value').set(#{path})
 
    $autoit = WIN32OLE.new("AutoItX3.Control") 

   $autoit.WinActivate("Choose file")

   $autoit.ControlSetText("Choose file", "", "Edit1", "#{path}") 

   $autoit.ControlClick("Choose file", "Look &in", "&Open")    

    $ie.button(:name, "Submit").click
 
But the same behaviour persists. 
i.e. the "Choose File" window opens and waits till you manually select the file.
 
Can't  ie.file_field(:value,'Value').set(#{path}) automatically set the path?
 
Thanks
Chaya
 


 



--Mark


Amitha Shetty <[EMAIL PROTECTED]> wrote:
Hi,
How can I open and attach file using file_field method?
when I try,
ie.file_field(:id,'uploaded_file').set('C:\file.txt')
I get "choose file"-window open .It waits for me, to choose a file and 
click "open" or whatever the button is called) , after that it 
continues normally, by submitting the file_field content. Why doesn't he choose a file by himself?How do I handle this?
I have ensured that there is no space in the path and the file exists in C: )
I get the same error when I run filefield_test in Unittests in watir folder.
 
Thanks,
Amitha
 
Send instant messages to your online friends http://in.messenger.yahoo.com _______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Send instant messages to your online friends http://in.messenger.yahoo.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to