Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click all the links on page and verify respective contents
#2
Not Solved
Hi

please find the below example
Code:
Set oDesc = Description.Create()
oDesc("html tag").Value = "A"
Set rc = Browser().Page().ChildObjects(oDesc)
num = rc.Count()

For i=0 to num-1
   tag = rc(i).GetROProperty("innertext")
   href = rc(i).GetROProperty("href")
   Reporter.ReportEvent 0, "Links in Page", "name: " & tag & ";    url: " & href
Next

If you want to click on the link...then inside the for loop you can write
rc(i).Click
Reply


Messages In This Thread
RE: How to click all the links on page and verify respective contents - by KavitaPriyaCR - 11-23-2010, 05:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 24,819 04-29-2017, 04:53 PM
Last Post: kowshik
  [UFT] [WPF] Verify if the cell contains an image robertosalemi 0 1,918 10-25-2016, 06:57 PM
Last Post: robertosalemi
Question Webtable contains cell contains two links, how to click on link srinivassure 9 53,669 07-30-2016, 03:41 PM
Last Post: Akshay
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,971 05-04-2016, 11:28 PM
Last Post: supputuri
  verify that parent properties match object currently displayed in your application. sona 0 3,146 02-21-2016, 12:00 PM
Last Post: sona

Forum Jump:


Users browsing this thread: 4 Guest(s)