Automation Testing, Manual Testing, QTP/UFT 11 , QC/ALM 11 ,SAP TAO, Unix, Selenium, Oracle SQL, Shell Scripting and For Online Trinings to contact me : Cell:+91-8897972059 , Email Id : quicktestprotech@gmail.com

Sunday, November 14, 2010

How to identify broken links in QTP

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. Now the question is how can we identify broken links with the help of QTP during the run session?
There can be two ways to do this:
  1. Using Automatic Page checkpoint.
  2. By manually creating a Page checkpoint.
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”
qtp-broken-links
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.
qtp-page-checkpoint
You will get the following screen:
page-check-qtp
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”
If you want to verify links pointing only to the current host check the box titled “Broken Links- check only links to current host” under Tools > Options > Web. Similarly If you want to verify links pointing to other hosts as well, uncheck it.
qtp-links-host

0 comments:

Post a Comment

Loading...