[Wtr-general] open file with file_field
zeljko.filipin at gmail.com
Mon Aug 8 05:56:30 EDT 2005
Try this (make sure you have 'file.txt' in 'C:\'):
ie = Watir::IE.start('http://validator.w3.org/')
There seems to be a bug when path contains spaces:
1) this works just fine
2) this returns error (in pop up window with title 'Choose file') -
C:\Documents File not found. Please verify the correct file name was given.
ie.file_field(:id,'uploaded_file').set('C:\Documents and Settings\file.txt')
So, for now, until bug is removed, just make sure your files for upload do
not have spaces in path.
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Neumann, Carsten -
Sent: Monday, August 08, 2005 11:36 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] open file with file_field
How can I open a file by using a file_field?
If I use:
ie.file_field(:name, fieldname).set(complete path)
I get the normal Windows- "Open file"-dialog. How can I now select a file,
or type the name using watir?
Or must I use something different?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Wtr-general