-->Check Points

A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. This enables you to identify whether your Web site or application is functioning correctly.
Note: If you want to retrieve the return value of a checkpoint (a boolean value that indicates whether the checkpoint passed or failed), you must add parentheses around the checkpoint argument in the statement in the Expert View. For example:
a = Browser("MyBrowser").Page("MyPage").Check (CheckPoint("MyProperty"))

Adding Checkpoints to a Test
You can add checkpoints during a recording session or while editing your test.
To add checkpoints while recording or editing:
Use the commands in the Insert > Checkpoint menu, or click the Insert Checkpoint button on the toolbar.
To add a checkpoint while editing only
Right-click the step where you want to add the checkpoint and choose Insert Standard Checkpoint.
Select the step where you want to add the checkpoint and choose Insert > Checkpoint > Standard Checkpoint.
Right-click any object in the Active Screen and choose the relevant checkpoint option:
Insert Standard Checkpoint
Insert Bitmap Checkpoint
Insert Accessibility Checkpoint
These options can be used to create checkpoints for any object in the Active Screen (even if the object is not part of any step in the Keyword View).

Standard Checkpoint:
This option is used to verify the physical properties and standard properties of an object or a window. It can be used on both windows and web applications.
Steps to insert Standard check point:
1. Ensure that the requires object is available
2. Click on Record -> Select insert -> Checkpoint -> Standard checkpoint
3. Take the hand icon -> Click on the required object
4. Select the required property -> Provide the expected value for each property
5. Provide the time out value for the checkpoint in seconds -> Click on OK
--> Using this checkpoint we can verify properties of one object only, but we can verify one or more properties of that single object.
Setting General Standard Checkpoint Options
The bottom part of the Checkpoint Properties dialog box contains the following options:
Checkpoint timeout. Specifies the time interval (in seconds) during which QuickTest attempts to perform the checkpoint successfully. QuickTest continues to perform the checkpoint until it passes or until the timeout occurs. If the checkpoint does not pass before the timeout occurs, the checkpoint fails.
For example, suppose it takes some time for an object to achieve an expected state. Increasing the checkpoint timeout value in this case can help ensure that the object has sufficient time to achieve that state, enabling the checkpoint to pass (if the data matches) before the maximum timeout is reached.
If you specify a checkpoint timeout other than 0, and the checkpoint fails, the Test Results window displays information on the checkpoint timeout.
Insert statement. Specifies when to perform the checkpoint in the test. Choose Before current step if you want to check the value of the object property before the highlighted step is performed. Choose After current step if you want to check the value of the property after the highlighted step is performed.
Note: The Insert statement option is not available when adding a checkpoint during recording or when modifying an existing object checkpoint. It is available when adding a new checkpoint to an existing test while editing it.

Page Checkpoint:
This option is used to verify the properties of webpage like Load time, number of images, number of links, HTML source ,HTML tag, source of that images, URL of that links and broken links
Note: This is applicable for WebPages only
Steps to insert Page check point:
1. Ensure that the required webpage is available -> Click on record
2. Select insert -> Checkpoint -> Standard checkpoint
3. Click on the required webpage
4. Select page option from hierarchy of the object
5. Select he required properties to be verified
6. Provide the expected values from properties
7. Provide the value -> Click on OK

To insert the page checkpoint automatically for each webpage, while recording, use the following step:
Tools -> Options -> Click on web tab -> Click on advance tab -> Enable the checkpoint or automatic page checkpoint -> Select the required properties to verify -> Click on apply -> Click on OK.