Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Broken Link Testing
#1
Not Solved
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
Reply
#2
Not Solved
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  check broken link in a page deveshbhatt29 0 2,617 01-18-2014, 12:35 PM
Last Post: deveshbhatt29
  Fixing broken Checkpoints mv8167 2 2,717 02-02-2012, 10:00 PM
Last Post: mv8167
  link based qtp siri 0 1,617 03-12-2008, 03:09 PM
Last Post: siri

Forum Jump:


Users browsing this thread: 1 Guest(s)