Hi Super Kevy, Thanks for your help. Please ignore the above mentioned query which i have posted as i was doing it wrongly at my end.
Please see below the updated query:----- There is no file field where i can set the value of the uploaded file....... In this case there is only a button and if user click that button then "File Upload dialog" box gets opened. The problem in this case which i am facing is:- ----- I am unable to click on the button using any property and the "File Upload Dialog" box did not appear. Details: <object> tag is used to create the button and a flash file is uploaded in it......... So is there any way from which i can click on it and "File Upload Dialog" box appear correctly.... Thanks in advance...... On May 12, 6:27 am, Super Kevy <[email protected]> wrote: > The preferred method is to use the file_field, but this is an > alternative > BTW: What error are you getting when you try to set using file_field? > > Basic AutoIT sample > ie.text_field(:id,'document_name').click # Open the popup > myAutoIT = WIN32OLE.new("AutoitX3.Control") > myAutoIT.WinWaitActive("File Upload","",15) # Set focus to the > popup > ##myAutoIT.ControlSetText("File Upload","",1148,sFileName) # 1148 > is the id found by the AutoIt Finder/Didnt work > myAutoIT.Send("{ALT}n") # Move to the file name field in the popup > myAutoIT.Send(sFileName) # Enter the Path and File Name > myAutoIT.ControlClick("File Upload","","&Open") > > On May 2, 4:36 pm, chaand <[email protected]> w > > On May 12, 3:09 am, sumit kumar <[email protected]> wrote: > > > > > > > > > Ok, my problem is to do with handling a windows ***file upload dialog box*. > > > I'm trying to write some code that will click the *file upload* button, > > navigate to path where the file is stored and after selecting a file click > > "Open" button of the* file upload dialog box*. > > ie.button(:id, "_______").click_no_wait > > ie.send_keys("c:\__________") > > ie.send_keys("{ENTER}") > > > Unfortunately click_no_wait just flashes the *dialog box and *does not pop > > up the Dialog Box. I've tried click by itself and that opens the *dialog box > > * but the rest of the script does not execute. > > > In this case i cannot use the file upload method:- > > $ie.file_field(:name, "").set("your file.txt") > > As there is no text field for setting the file name in the textboxes. > > > Application Functionality:- > > There is "Select File" button and on clicking it, shows "File Upload" Dialog > > box and if user select a file and press enter the file automatically starts > > uploading.... > > > Any Ideas on this? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
