Sunday 4 May 2014

QTP - UFT - File Content Checkpoint in UFT


As the name say "File Content" Checkpoint are used to check the contents of the file. The following file contents can be checked using this check point

1) PDF Files
2) RFT Files
3) WinWord Files
4) Text Files
5) HTML Files

Step 1
In Order to insert a file content check point user need to click on Design> Checkpoint > Select "File Content Checkpoint" as shown below



Step 2
Once File Content Checkpoint is selected, "Source for File Check point" popup is displayed and user can select the source file for file content check point. In the given example I have selected a file with name "List of solar manufacturers participated.doc" and the content of the file is shown below.


Step 3 
User can keep checkpoint for the input file as shown below. Options like Parameterization, Regular expressions etc. are provided while inserting this check point 




Step 4
The following link of code is displayed after inserting the check point

FileContent("List of solar manufacturers").Check CheckPoint("List of solar manufacturers participated.doc")

Step 5
Below Image displays the file content checkpoint in OR with selected Checkpoint in the file


Step 6 
Run the UFT Test and the File content checkpoint will be executed and the following result is displayed. If we have checkpoint failures the result viewer will display the Actual and Expected result and their respective snapshots

Happy Reading,
Sreenu Babu

14 comments:

  1. Hi, do you know if there's a way to display the exact difference in the lines of the check fails? It's showing me the 'modified' lines by default but I'd like to see the exact character that differs.

    ReplyDelete