Yes this will work, but this does not answer my question, how do I know 
the index of the link?  Some of the links have 3 to 4 duplicates.
Thanks

On Tuesday, January 3, 2017 at 2:34:17 AM UTC-5, Ravikiran wrote:

>     Please try append with index:=0 in the link
>     Browser("title:="&BrowserTitle, "name:="&BroswerName).Page("
> title:="&BroswerPageTitle).link("name:="& LinkName,"index:=0").click
>
> On Sat, Dec 31, 2016 at 1:23 AM, <[email protected] <javascript:>> wrote:
>
>> 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] 
>> <javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
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.

Reply via email to