Relevant for: GUI tests and scripted GUI components
You can use file content checkpoints to compare the textual content of a file that is generated during a run session with the textual content of a source file. This enables you to verify that the generated file contains the expected results. For example, you may want to verify that a PDF file generated during a run session displays the local corporate address at the top of every page.
You can perform a checkpoint on text in one line, multiple lines, or the entire document, as needed. You can also specify what to ignore. For example, if you expect certain lines or areas in the file to change, you can exclude them from the checkpoint.
When you select a source document to compare, UFT One converts a copy of this document to a text file and displays the content in the file content editor area of the Checkpoint Properties Dialog Box enabling you to configure your checkpoint. You can use parameters and regular expressions to augment your checkpoint, as needed.
The source file for a file content checkpoint must be located on the file system.
You can perform a file content checkpoint for any of the following file types:
Note: File content checkpoints on other types of files may pass, even if the file content does not match the expected value.
If a file content checkpoint step fails during a run session, the step summary in the run results displays a side-by-side comparison of the generated document and the source document, enabling you to visually compare the differences between the documents, including lines or sections that were added or removed.