Skip to content

Verify Text Command: verifytext

The VerifyText function allows you to confirm whether specific text exists in a text file. This can be helpful in scenarios such as verifying log entries, checking configuration settings, or validating the presence of specific keywords in a text file.

Example:
You have a log file named systemLog.txt stored in C:\Logs, and you want to check if the text “Error Code 404” is present in the file.

Steps to Configure:

  1. Select Set a Variable Value from the Action dropdown.
  2. In the Element Key field, enter a variable name (e.g., TextFoundResult). This variable will store the result of the verification (true or false).
  3. Click on Form to open the configuration form.
    • From the dropdown, select Functions and choose File Handler Functions.
    • In the Cmd field, select verifytext.
    • Provide the following parameters:
      • File: Enter the file path to the log file (e.g., C:\Logs\systemLog.txt).
      • Text: Specify the text to be verified (e.g., Error Code 404).
  4. Click Save.
scrn-verify-text-command-tabular-view
Tabular View
scrn-verify-text-command-card-view
Card View

Outcome on Execution:

  • If “Error Code 404” is found in the file systemLog.txt, the function stores “true” in the variable TextFoundResult.
  • If the text is not found, the function stores “false” in the variable.
  • You can then use this variable in subsequent steps, using the syntax ${Variablename} (e.g., ${TextFoundResult}).

The text verification is case-sensitive; ensure the exact text, including case, is provided.

Back To Top