I have the script in AutoIT (to handle upload file window in selenium)
WinWaitActive("File Upload")
Send("C:\Users\XXX\Desktop\Folder1\MyFile.xlsx")
Send("{ENTER}")
Instead of hard-coding pathname, I want to pick-up pathname from a property file.(So that tomorrow we dont to touch AutoIT script to modify pathname).
Is there any way to do so?
Update 1:
java code:
Runtime.getRuntime().exec(TestUtility.properties.getProperty("test.all.autoit.testdata"));
Thread.sleep(8000);
AutoIT code:
WinWaitActive("File Upload")
Send($CmdLine[1])
Send("{ENTER}")
Cmd line:
c:>java -jar pathToJar.jar pathToProperties.properties pathToFileUpload.xlsx
Properties file:
test.all.autoit.testdata='C:\\XX\\XX\\XX\\someFolder\\ListUploadScript.exe'
AutoITinstead ofSelenium?!seleniumallow to upload file without handling pop-upOSnative pop-up