Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to print link names in a for list
12-20-2011, 06:19 AM
Post: #1
how to print link names in a for list

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
Find all posts by this user
Quote this message in a reply
12-20-2011, 09:53 AM
Post: #2
RE: how to print link names in a for list
Hi Dude,
will you please confirm whether "intcount" and "incount" are same?

With Smile
A.Sathiya
Find all posts by this user
Quote this message in a reply
12-20-2011, 10:39 AM
Post: #3
RE: how to print link names in a for list
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)