Micro Focus QTP (UFT) Forums

Full Version: QTP childObject
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am using QTP11 with windows7 64 bit.
In my code I use the childObject method and in some cases it doesn't work.

I reproduce it with the below code and using file I generated with different number of the following link:
<a href="http://www.w3schools.com" target="_blank">Visit W3Schools</a>

If I have 10100 the code print 10100 objects.
If I have 10300 the code print 0 objects and there is error.

How can this be solved ? Is there a limit to the number of objects or time limit ?

Thanks

Code:
Set d = Description.Create
d("micclass").value = "Browser"
Set r = Desktop.ChildObjects(d)
Set br = r(0)
Set d = Description.Create
d("micclass").value = "Page"
Set r =br.ChildObjects(d)
Set p = r(0)
Set d = Description.Create
d("micclass").value = "Link"
Set r =p.ChildObjects(d)
print r.count
I created a html file (see attached text file) with 22000+ links in the page and ran your code. I'm able to see the result correctly. As far as i know, there is no limit in getting count of child objects. Can you please retry with the attached file?