Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to print link names in a for list
#1
I am trying to print all link names on a page using following code
For inCount = LBound(myHomePageLinks) To UBound(myHomePageLinks)
'If Browser("Horizon Blue Cross Blue").Page("Horizon – Plan Configurator").Link(intCount).Exist Then
'Reporter.ReportEvent micPass, "Found", myHomePageLinks(intCount)
'else
' Reporter.ReportEvent micFail, "Failed", myHomePageLinks(intCount)
'Print(arrayElements)
'msgbox(arrayElements)

'end If
'Next

But I am getting error @ this place: Link(intCount).Exist Then

Could someone please help with this issue

Thanks,
Sqadri
Smile
Reply
#2
Hi Dude,
will you please confirm whether "intcount" and "incount" are same?
Reply
#3
Hi,
myHomePageLinks---> I think this is an array where u had stored all the links present on the page.
In "'If Browser("Horizon Blue Cross Blue").Page("Horizon – Plan Configurator").Link(intCount).Exist Then "
u are checking if link exists or not but intcount doesn't specify the object here, it will give you the refrence for a particular object in the loop. If you want to access the link use Set obj=Browser("Horizon Blue Cross Blue").........
then go for obj(intcount).Exists
if true then print the name or what ever action u want to perform.

Regards,
Sankalp
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)