Hi,
Is there a way for me to induce a delay for a downloaded file?
WebUI.delay(##) does not work for me because the download times differ.
Thanks,
-MJ
Hi,
Is there a way for me to induce a delay for a downloaded file?
WebUI.delay(##) does not work for me because the download times differ.
Thanks,
-MJ
Hi
You Download The File?
Is the storage path using sndkey?
Hi,
No it’s not through sendkeys… It’s a click of a button
Hi
I have written a similar
Maybe you can change to a while loop
Until the specified file name appears
I hope this helps you.
I wish you a wonderful Friday.
@Keyword
def MoveDownloadFile(String argFileName, String argMoveToPath) throws Exception {
String varSystemUserName = System.getProperty('user.name')//user.name
File varDownloadFile = new File(WebUI.concatenate('D:\\Users\\', varSystemUserName, '\\Downloads'))//'D:\\Users\\XXXXX\\Downloads'
File [] varDownloadFileList = varDownloadFile.listFiles()
for(int i=0; i <varDownloadFile.listFiles().length;i++){
String varDownloadFilename = varDownloadFileList[i].getName()
if(varDownloadFilename.indexOf(argFileName) == 0){
String varFilePath = WebUI.concatenate('D:\\Users\\', varSystemUserName, '\\Downloads\\', varDownloadFilename)
File varFileOldPath = new File(varFilePath)
String varFileNewPath = WebUI.concatenate(argMoveToPath, varDownloadFilename)
varFileOldPath.renameTo(varFileNewPath)
return varFileNewPath
break
}
}
}