It looks fine, you might however have to use ControlFocus to make sure the control has focus before attempting to click on it.
autoit.ControlFocus("Enregistrer sous", "", "&Enregistrer") autoit.ControlClick("Enregistrer sous", "Enregistrer &dans :", "&Enregistrer") -Charley On 5/4/07, Maisonnette <[EMAIL PROTECTED]> wrote:
Hi everyone, Do you know how can i use watir to 'pilot' a 'save as' internet explorer form ? I already found this code : ----- *autoit = WIN32OLE.new("AutoItX3.Control")* *autoit.WinWait("Téléchargement de fichier", "Voulez-vous ouvrir ou enregistrer ce fichier ?", 15)* *autoit.ControlClick("Téléchargement de fichier", "", "Button2")* *autoit.WinWait("Enregistrer sous", "Enregistrer sous", 15)* *autoit.ControlSetText("Enregistrer sous", "Enregistrer &dans :", "Edit1", "c:\test.zip")* *autoit.ControlClick("Enregistrer sous", "Enregistrer &dans :", "&Enregistrer")* ----- The line number 1 : Return 1 The line number 1 : Return 1 The line number 1 : Return 1 The last one return 0 And with this code i got the focus on the 'save as'(Enregistrer sous) button ... I really don't understand why i can't click on it because the 'ControlClick' function is build to do that ! :-) Any help will be highly appreciated ! :-) Some complementary informations : ----- +http://rubyforge.org/tracker/index.php?func=detail&aid=2467&group_id=104&atid=490+ +http://www.autoitscript.com/autoit3/docs/functions.htm+ +WinXp Sp2 (French)+ +ruby 1.8.5 (2006-08-25) [i386-mswin32]+ +watir-1[1].5.1.1145 (gem)+ _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general