hi ,
you can use below function
Click_GoogleSearchLink 2

' Desc: User can pass  any number  from search  page to click  based on index.
' If  user wants to click 3 rd  link in search , pass 2 as parameter
Function Click_GoogleSearchLink(Order_Linktolink )
Set oDesc = Description.Create()
oDesc("micclass").value="link"
oDesc("html tag").value="A"
oDesc("height").value=19 ' searched link has common property apart
from other links in page
Set obj= Browser("name:=.*Google Search").Page("title:=.*Google
Search").ChildObjects(oDesc)

For i=0 to obj.count
 msgbox obj(i).GetROProperty("text")
 If i =Order_Linktolink Then ' index is 2  since user wants to click
link 3 search page
         obj(i).click
         Exit for
 End If
Next
End Function


Regards,
Ravi

On Wed, Feb 13, 2013 at 8:33 PM,  <[email protected]> wrote:
> Use index property
>
> Arun Ganesan
> Mobile: +91-9841558711
>
> Sent from my iPhone
>
>
> On 13 Feb 2013, at 20:11, vivek joglekar <[email protected]> wrote:
>
> Hi,
>
>
> What is QTP code for .
>
> After entering any text/ keyword. in Google search .QTP should click link no
> .3 [or specific link X ] of Google search page.
>
> --
> --
> 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/groups/opt_out.
>
>
>
> --
> --
> 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/groups/opt_out.
>
>

-- 
-- 
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/groups/opt_out.


Reply via email to