Using the controlFocus method:
ControlFocus("File Upload", "", "Edit1")
ControlSetText("File Upload", "", "Edit1", "C:\Test.2.0.war")
ControlClick("File Upload", "", "Button1"
AutoIt successfully browsed and opened a file in Firefox and the correct file name was displayed, however; the Selenium webdriver was unable to click on the upload button after this, throwing an error:
UnreachableBrowserException: Error communicating with the remote browser.
The webdriver code used is:
Runtime.getRuntime().exec("D:\\AutoIT\\FileUpload.exe");
Thread.sleep(5000);
What could possibly be wrong?