QTP Tutorial #15 – Using Text Area, Table, and Page Checkpoints in QTP

In the last article, we were discussing the ways in which QTP can compare text. We also saw how standard checkpoint can be used to check the text and discussed the text checkpoint in detail. The next checkpoint is Text area checkpoint. Let’s begin exploring it.

Note – We have aggregated links to all these QTP training tutorials on this first QTP tutorial.

Text area checkpoint:

Table checkpoint:

Let us look at an example:

I will pick a random site that has a web table. Open in internet explorer. Start recording, insert checkpoint->Standard checkpoint and choose the table object in the web page:

Select the Web Table element and click OK.

In the properties window, select the cell and specify if a constant value has to be there or parameterize.

In the settings tab, the way in which the verification has to be carried out.

Cell identification, this tab is where the user has the settings to identify a particular row or column.

As I said earlier since this is a variation of standard checkpoint all the same rules apply.

Page Checkpoint:

Page checkpoint is another variation of a standard checkpoint, which as the name indicates comes up when created on a Web Page.

It can be used for the following:

  1. Checking links
  2. Sources of images
  3. Check for broken links

Let us place one and see how it works and what it can do as we proceed.

Open Google.com in internet explorer or any browser compatible with the current version of QTP you have on your machine. Record a new test in QTP, Select “Insert Checkpoint->Standard checkpoint” and point it to the google.com page. Then select the “Web Page” object from the object list displayed.  The following dialog gets displayed:



As you can see, the parameters that can be checked are in the list and proceeded with a checkbox with a check option. The users can choose a number of properties as required.

As it is the case with all the other checkpoints we have seen so far, each of these properties can be a constant value or the user can parameterize.

Next section is the HTML verification:

HTML source: Checks if the HTML code for the web page matches the actual one at runtime. The user has an option to modify it as required while creating a checkpoint and check if it matches at the run time.

HTML tags: Checks the HTML tags for the web page at a record and run times. As with HTML source, HTML tags can be modified too.

‘All Objects in the page’ section:

a) Links: On checking this, all the links are verified. To check only certain links the “Filter Link Check” can be clicked and the following dialog appears:

You can select the links or unselect them.

The link URL value again can be a constant or a parameterized value.

b) Images: Checking this ON means that you can verify the presence of the images on the page at runtime.  On clicking “Filter Image Check” the user can select the exact images that are to be checked and the ones that have to be ignored.

The following tab gets displayed when the user chooses to Filter:

As usual, the user can configure the values.

c) Broken Links: This option is not usually ON by default and on checking it ON, it verifies if there are any broken links in the web page.

The user can check for broken links that are only on the same host as of the parent page. The relevant option has to be set in the following screen that can be launched by using “Tools->Options->Web” menu option.

Once this checkpoint is run all the failures if any will be displayed the Test Results. Otherwise, the checkpoint passes.

Some of the Page Checkpoint options are available only when the checkpoint is created during recording. If you try to create them from the Active screen or Keyword view, the HTML verification options won’t be available.

To summarize the page checkpoint:

1) Useful in the web add-in while checking pages. Checks for the integrity of the pages

2) A variation of a standard checkpoint, so all the rules of creation, editing and maintaining are the same.

3) QTP can be instructed to put a checkpoint on every page. This can be done by choosing “Tools->Options->Web->Advanced” from the menu and clicking the option ON:

4) Alternately, you can instruct QTP to bypass automatic checkpoints. Select the following option in the same window that we launch in point 3.

That leaves us with Accessibility, Database and XML checkpoint which will be the topics for the next session. Please post your comments and questions.