Set oDesc = Description.Create() ' Define a new Object
oDesc("micclass").Value = "Link" ' Object Class
'--------------------------------------------------------------------------------
User can change the class according to the requirement.
E.G when referring web elements,.use as follows
oDesc("micclass").Value = "WebElement"
'------------------------------------------------------------------------------------
Set Links = Browser("Google Labs").Page("Google
Labs").ChildObjects(oDesc)
Define a new Object as Links,
the 'Links' object contain all the links available in the Page.
The 'Links' object is a array of Objects.
Links.Count ' that will return number of elements available in the
array
By using following method You can access the each array element and
retrieve its properties.
Msgbox Links(0).Exist(0)
Msgbox Links(0).GetRoProperty("text")
On Apr 19, 1:08 pm, Waheed Yakub <[email protected]> wrote:
> Set oDesc = Description.Create()
> oDesc("micclass").Value = "Link"
> Set Links = Browser("Google Labs").Page("Google
> Labs").ChildObjects(oDesc)
> Msgbox "Total links: " & Links.Count
>
> --
> 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
> athttp://groups.google.com/group/MercuryQTP?hl=en
--
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