Broken Links also sometimes called as dead links are those links on the web which are permanently unavailable. Commonly found, 404 error is one example of such link.
There can be two ways to do this:
Using Automatic Page checkpoint: Go to Tools > Options > Web > Advanced and check the two boxes labeled “Create a checkpoint for each page while recording” and “Broken Links”
- Using Automatic Page checkpoint.
- By manually creating a Page checkpoint.
Now every time you record a new page, QTP will automatically include a checkpoint for broken links.
By manually creating a Page checkpoint: QTP does not provide a direct menu option to incorporate a page checkpoint. You need to take the help of standard checkpoint. Start recording session > Insert > Checkpoint > Standard Checkpoint (OR press F12). Place and click the hand pointer anywhere on your web page. Select Page (As shown in picture below) and Click OK.
You will get the screen:
Check “Broken Link” checkbox down below and click OK.
Now, how will you verify page checkpoint and hence broken links?
Run the above script. Go To Test Results > Your Check Point. Check the status of all links under “Broken Links Result”