Hello kenh,
You definitely can use a wildcard in ZAPTEST:
To use a wildcard you add the file name as an object and specify its “Text” property as, for example, “Test_2.*”, ZAPTEST will then locate the file which has the prefix “Test_2”.
But based on your description I believe the best solution is not to use a wildcard because, for example, if there are several of such files with the same prefix in the same directory ZAPTEST may located a different file instead of the specific one;
In such case (Where there is a chance to have several of such files) I would recommend to generate the file’s name, for example, if the file’s name is “Test_2162018.xls” use this code to generate the file’s name, update the “Text” property and check if the file exists:
strDate = Date
strDate = Replace(strDate, “/”, “”)
strFilename = “Test_” & strDate & “.xls”
Application(“Application”).View(“View”).Object(“File Name”).SetProperty “Text”, strFilename
If Application(“Application”).View(“View”).Object(“File Name”).Exist Then
Application(“Application”).CustomReport True, “File Exists”, “File exists.”, True
Else
Application(“Application”).CustomReport False, “File does not Exist”, “File does not exist.”, True
End If
Hope this helps.
Thanks,
ZAPTEST Team