Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with childObjects
#1
Hi,

I am using the childObjects command in my testing.
I encounter problem in some pages that contain large number of objects.
I see that qtp become "not responding" and it return after 5 seconds empty list.

When I run this on different machine (same OS version, same QTP11 version) it works OK.

I encounter the same problem after login to facebook or in ynet.co.il page .

It doesn't help if I add description.

Example for code :
Code:
Set oDesc = Description.Create oDesc("micclass").Value = "Browser" Set childs = Desktop.ChildObjects (oDesc) Set child = childs (0) print child.toString Set oDesc = Description.Create oDesc("micclass").Value = "Page" Set childs = child.childObjects(oDesc) Set child = childs(0) print child.toString Set childs = child.childObjects print childs.count
Reply
#2
Hi,

Could u please use different variables for 2 description u are creating. Since there are same variables referencing each other in 2 description created.

Regards,
Sankalp
Reply
#3
Hi,

This code works on most pages except large pages.
On different machine it does works but if I increase the number of elements in page at some point it stop.

I try with different var names with the same result.

Thanks
Reply
#4
Hi,
For ur code:
Code:
Set oDesc = Description.Create oDesc("micclass").Value = "Page" Set childs = child.childObjects(oDesc) Set child = childs(0) print child.toString [color=#FF0000]Set childs = child.childObjects[/color] print childs.count

For the coloured line of code cpould u please specify the description of the child objects u want to store.

Regards,
Sankalp
Reply
#5
This is a code I try on facebook page after I login:

print Browser("Facebook").Page("Facebook").Link("Yossi Birenboim").Exist
Code:
Set oDesc = Description.Create oDesc("micclass").Value = "Link" oDesc("text").Value = "Yossi Birenboim" Set childs = Browser("Facebook").Page("Facebook").ChildObjects(oDesc) Set child = childs(0) ' Cause general run error print err.number '

The output is :
True
-2147467259
Reply
#6
Hi,

Are u trying to get the child objects of a link ,, as per ur code???

Regards,
Sankalp
Reply
#7
Hi,

I am trying to run the command childObjects.
With or without description it doesn't work.
Reply
#8
Hi,

If u r trying 2 run the child objects command but before that please chk that object on which u r running this command is a parent object. I don't think here link is a parent object.
Please go through qtp help file it will help u.

Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help in creating dynamic object string using Childobjects Keshub Mathur 0 2,036 09-11-2017, 05:52 PM
Last Post: Keshub Mathur
  childObjects not working sometimes hadar 0 2,187 07-30-2013, 12:04 AM
Last Post: hadar
  How to get ChildObjects to register table? Tonya S 0 3,051 09-09-2011, 03:00 AM
Last Post: Tonya S
Question "Or" (|) does not work in Regex, using childObjects?? ConstantChange 0 2,605 10-08-2008, 10:40 PM
Last Post: ConstantChange

Forum Jump:


Users browsing this thread: 1 Guest(s)