Hi That's exactly what I done and it works...it would be great if Watir will be able to work with dictonary file parameter...one day perhaps...
thank's for the link. Pierre On 5 déc, 01:48, "Bill Agee" <[EMAIL PROTECTED]> wrote: > The French OS could be the issue. It looks like a similar ira bug exists: > > http://jira.seleniumhq.org/browse/WTR-21 > > I'm using Watir 1.5.6, so on your version there may be > differences...but on my machine, the English title text for the > "Choose file" dialog is hardcoded in this file: > > \ruby\lib\ruby\gems\1.8\gems\watir-1.5.6\watir\input_elements.rb > > On line 443 (inside the set method), I see this: > > system("rubyw -e \"require 'win32ole'; > @autoit=WIN32OLE.new('AutoItX3.Control'); [EMAIL PROTECTED] > 'Choose file', '', 15; sleep 1; if waitresult == 1\" -e > \"@autoit.ControlSetText 'Choose file', '', 'Edit1', '#{setPath}'; > @autoit.ControlSend 'Choose file', '', 'Button2', '{ENTER}';\" -e > \"end\"") > > If you want to try a workaround, try changing the three instances of > the string "Choose file" on that line to the equivalent dialog title > IE displays on your machine. > > If you can get it working, it might be useful to document the > workaround in the comments for the Jira ticket. > > The string "Choose file" also appears a few times in winClicker.rb, > but I don't think the file field code in there is used anymore (unless > I'm misreading the source). > > On 12/4/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I ask myself does file_field set method works in French Operating > > System ? > > > On 4 déc, 21:26, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > 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...- Masquer le texte des messages précédents - > > > > - Afficher le texte des messages précédents - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---