I have selenium script that is going through website to get a quote then gets to file upload, click on element and file upload window opens. My AutoIt script is below and it works when I execute it manually.
WinWait("[CLASS:#32770]","",10)
ControlFocus("File Upload", "", 1148)
Sleep(2000)
ControlSetText("File Upload", "", 1148, "C:\Users\kmaklakova\IdeaProjects\WizardLabelsRegression\vector.jpg")
Sleep(2000)
ControlClick("File Upload", "", 1)
When i try to run it during Java runtime it exits with ecit code 1
uploadArea1.click();
Process p = Runtime.getRuntime().exec("C:\\AutoIt3\\new.exe");
p.waitFor();
if (p.exitValue()==1) {
System.out.println("YAY!");
}
else {
System.out.println("boo");
}
label1Name.setValue("test");
Does anyone know what is the reason?