Hi,
I'm working on a website which has duplicate link names. When I run the
following code, the script fails when it reach the duplicate
link.(indicating there is
more than one name for this link). How can I handle this situation? I'm
guessing I should use index because that's unique for duplicate links. How
can I
get index?
Set oLinkChild = Browser("title:="&BrowserTitle,
"name:="&BroswerName).Page("title:="&BroswerPageTitle).childobjects(oLink)
iCount = oLinkChild.count
'the following code fails when it reaches the duplicate link
For i = 0 to iCount - 1
Linkname = oLinkChild(i).GetROProperty("name")
Browser("title:="&BrowserTitle,
"name:="&BroswerName).Page("title:="&BroswerPageTitle).link("name:="&
LinkName).click
Next
For i = 0 to iCount - 1
Linkname = oLinkChild(i).GetROProperty("name")
Index = oLinkChild(i).GetTOProperty("index") (this doesn't
get the index)
Browser("title:="&BrowserTitle,
"name:="&BroswerName).Page("title:="&BroswerPageTitle).link("name:="&
LinkName, "index:="&Index).click
Next
Thank you for your help
Happy New Year
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.