Micro Focus QTP (UFT) Forums

Full Version: QTP Broken Link Testing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to Test all Web Links for that i try to create following code but stucks in between. Can anyone provide me the exact code?

Code:
Dim WindowObj, nameoflink
Set WindowObj = Description.Create
WindowObj("Class Name").Value = "Link"
Set nameoflink  = Browser("Browser").Page("Page").ChildObjects(WindowObj)
'This gives error to me. NOT GETTING WHY?

Code:
msgbox nameoflink.Count

For i = 1 to nameoflink.Count -1
       ' Then i want to get the Name for Each Link
       ' then want to Click the Link object
       ' then want to come back to original page
       ' This i want to continue till all LINKS clicked & Tested
Next


It would be gr8ly appreciated if anyone can reply with exact code.
Thanks
Hi,

Code:
Dim WindowObj, nameoflink
Set WindowObj = Description.Create
WindowObj("micClass").Value = "Link"
Set nameoflink = Browser("Browser").Page("Page").ChildObjects(WindowObj)
msgbox nameoflink.Count
I think this should solve the problem...


Rolleyes