-
Junior Member
Qtp
How do we count the links displayed on page using QTp,can we use getrop property,pls do me needful with dis coding part,suppose there ar some 10 links
we need to count the links and we need to validate.
-
Moderator
Re: Qtp
You can count the links using the following code:
Set oLink = Description.Create()
oLink("micclass").value = "Link"
oLink("html tag").value = "A"
Set oLinkCount = Browser("").Page("").ChildObjects(oLink)
MsgBox oLinkCount
-
Junior Member
Re: Qtp
Set ObjectControl = Browser("Name").Page("Name")
Dim oDesc
Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"'It is nothing but the class name of respective object.
Set Objects = ObjectControl.ChildObjects(oDesc)
environment("Objectscount") = Objects.Count'This environment variable holds the number/count of object of specified class in the destination page.
Cheers!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules