FindChild and FindChildEx hang, even with timeout
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
Desktop Testing
-
Script Tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try setting this Delay between events to something just a little slower. That can help with a lot of timing issues.
Marsha_R
[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.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
