|
You could try something like—you will need to tweak it
to work for your application: $path =
"C\:\\watir_bonus\\working\\Approach.doc" $ie.frame(:index, 5).file_field(:id,
"fileName").set("#{$path}") $autoit =
WIN32OLE.new("AutoItX3.Control") $autoit.WinWait("Choose file",
"Do you want to open or save this file?", 3) $autoit.WinActivate("Choose
file") $autoit.WinWait("Choose file",
"Look &in", 3) $autoit.ControlSetText("Choose
file", "", "Edit1", "#{$path}") $autoit.ControlClick("Choose
file", "Look &in", "&Open") $ie.frame(:index, 5).button(:name,
"submitLinkManagerForm").click --Mark From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Amitha Shetty 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 I
have ensured that there is no space in the path and the file exists in C: ) 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
