Ask a Question

FindChild and FindChildEx hang, even with timeout

Occasional Contributor

FindChild and FindChildEx hang, even with timeout

Main point: FindChild and FindChildEx are hanging. They do not return, either quickly (for FindChild) or after the timeout (FindChildEx).

I can walk the object tree easily down to a level of Page. Below that are Panels and possible nested Panels, all ending in TextNodes.

In particular, I need to find TextNode(0) at the end of an unknown length (possibly 0) of nested child Panel(0)


The following *should* work (I'm using Python):

    curObj = page

    panel = curObj.FindChild("Name", "Panel0")   # FindChild ignores ( and )  # Find Panel0 (if it exists) in the Page

    while panel.Exists:     # recurse through any Panel0

        curObj = panel

        panel = curObj.FindChild("Name", "Panel0")

    textNode = curObj.FindChild("Name", "TextNode0")    # find TextNode0 at the end of the Panel0's

    return textNode


But about 10% of the time FindChild hangs. Even FindChildEx ignores the timeout and hangs.

If I close the window, FindChild (or FindChildEx) returns immediately.


So why is FindChild hanging? This is messing my tests royally.

Community Hero

Try setting this Delay between events to something just a little slower. That can help with a lot of timing issues.

[Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
Occasional Contributor

If only the issue were timing. I have added Delay() statements to ensure that the window and its objects are fully formed and present. But I see delays of ~1200 seconds (~20 minutes), at which time TC errors out saying that the UI is locked.


But I do appreciate the link to the page with the Playback Options

Showing results for 
Search instead for 
Did you mean: