|
Yes, the problem is (:value, ‘Value’) in this
line: ie.file_field(:value,'Value').set(#{path}) The file_field supports these attributes: :id, :name,
:index. Do a view source and find out what the attribute values for your <input
type = file> tag. If for some reason your developers were lazy and
didn’t give the tag an id or name attribute, use index. If there
are more than one <input type = file> tag on the page the indexing starts
top-most down with 1 and increments from there. Here is the usage portion for file_field from Watir.rb: # This is the
main method for accessing a file field. Usually an <input type = file>
HTML tag. # *
how - symbol - how we access the field , :index, :id, :name etc # *
what - string, int or re , what we are looking for, # # returns a
FileField object # # Typical Usage #
# ie.file_field(:id,
'up_1')
# access the file upload field with an ID of up_1
# ie.file_field(:name,
'upload')
# access the file upload field with a name of upload
# ie.file_field(:index,
2)
# access the second file upload on the page ( 1 based, so the first field is
accessed with :index,1) Hope this helps, --Mark From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of chaya shetty Hi, I
tried with
$autoit = WIN32OLE.new("AutoItX3.Control") 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
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
