Where can i found the broken links in QTP?

Questions by SANDYADDL

Showing Answers 1 - 6 of 6 Answers

Valentina

  • Aug 20th, 2012
 

There can be two ways to find this 1. Through QTP Explained below and the other one is 2. Manual In Menu Bar Go to Tools > Options > Web > Advanced and check the two boxes labeled Create a checkpoint for each page while recording? and Broken Links? so by selecting this whenever you record a new page , QTP will automatically includes a check point for broken links. You can even give a example for broken link also called as "Dead Links" "Page not found 404 ERROR"

  Was this answer useful?  Yes

Moreshwar Deshmukh

  • Dec 11th, 2013
 

Also you can do this by VB script

Code
  1. //Broken Link in vbscript  

  2. Dim URL,httprot

  3. URL= Browser().Page().Link().GetROProperty(href)  

  4. Set httprot = CreateObject(MSXML2.XmlHttp)

  5. httprot.open GET,URL,FALSE

  6. httprot.send()  

  7. if httprot.Status<>200 Then

  8. Print Link is Broken

  9. Else

  10. Print Link is Active

  11. End If    

  12. Set httprot = Nothing

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions