Using wildcards in validation

Using wildcards in validation

Home Forums Ask Expert Using wildcards in validation

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #31637
    Sasha ZAP
    Moderator

      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

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.

    Virtual Expert

    ZAPTEST

    ZAPTEST Logo