I wanted to upload the file using AutoIt in Selenium WebDriver. I've AutoIt code for pasting the path of the file in window prompt and clicking on the open button.
but my problem is after clicking on the 'Browse' button using the below code, window prompt for file upload is appearing and my code is not moving from that point to next line where Im calling autoit executable file.
driver.findElement(By.xpath("//div[@class='field-group file-inputlist']//div[@class='field-group ']//input")).click();
My AutoIt Code is
WinWait("[CLASS:#32770]","",10) ;
//Set input focus to the edit control of Upload window using the handle returned by WinWait
ControlFocus("File Upload","","Edit1") Sleep(2000) ;
//Set the File name text on the Edit field
ControlSetText("File Upload", "", "Edit1", $CmdLine[1]) Sleep(2000) ;
//Click on the Open button
ControlClick("File Upload", "","Button1");
Eclipse is not even throwing any error or exception. Code stops at the point where the browser clicks on Browse button and a window prompt opens.
Note: If I close the Window Prompt Manually then the Code is continued from there.