Hi Wesley,
thank's for so quickly answer...
I ask myself why there is a IE.attach(...) command before upload ? is
it for attach the open file dialog ? what must I type in (...) as
attach parameter ?
On 4 déc, 16:40, "wesley chen" <[EMAIL PROTECTED]> wrote:
> Below code, is for english operation system and upload two files: c:\*.jpg
> and c:\*.xls
> def upload_file(ie, filepath,index=1)
> if filepath.include?("/")
> filepath.gsub!("/","\\\\\\")
> end
> ie.file_field(:id,"theFile[#{index-1}]").set(filepath)
> end
>
> ie=Watir::IE.attach(...)
> upload_file(ie,"c:\\Calendar_Day_Add+1.jpg")
> upload_file(ie, "c:\\TC_TRAIN_3156.xls",2)
>
> Thanks.
> Wesley Chen.
>
> On Thu, Dec 4, 2008 at 10:49 PM, [EMAIL PROTECTED] <
>
> [EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I try to find all over the post, I read and I read post ...but I have
> > no the answer for my problem...
>
> > I use file_field set method ( I find how regsiter th AutoItX3.dll
> > Wahou !!) so now the dialogue box appears...
> > But (there is always a But)... it dosen't select my file putted with
> > the set method...
>
> > I read some post about the file extension association with the dialog
> > box "open file" And when I look my Dialog box I see "photos
> > (*.jpg,*.bmp...) and HTML (*.html)" but my upload file is a zip one...
>
> > I don't know (find) how to change this extension file association and
> > help my test to select my file and upload it automatically.
>
> > Thank's you for your help.
> > pleb newbie watir...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---