Using wildcards in validation
- This topic has 1 reply, 2 voices, and was last updated 7 years, 2 months ago by
Sasha ZAP.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Home › Forums › Ask Expert › Using wildcards in validation
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
Already have an account? Login
Check you SPAM folder if you do not see the email.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |