Object browser not refreshing, form is never found while waiting
All,
I have a script I am trying to create that is checking different parts of the software to see if things are loaded or not. In this case, I am checking for the main form within our application, frmMainVsd. I am using the code below:
while (!Aliases.WaitChild("frmMainVsd",-1).Exists)
{
Sys.Refresh();
}
I notice that even after frmMainVsd is visibly loaded on the screen, TestComplete still does not see it (Version is 10.5.2702.7) and it just sits there forever waiting on the form. If I stop the test and look at the object browser, I still see the previous form and I have to perform a refresh inside the object browser before frmMainVsd is loaded into the object browser list.
Am I doing something wrong here? I also tried placing Sys.Refresh before the form check, but it still is not refreshing to show the loaded form in object browser.
Does this produce different results for you?
while (!Aliases.WaitAliasChild("frmMainVsd", 0).Exists) { /* switched to use WaitAliasChild we want the .Exists check to timeout instantly then refresh the sys object previously specifying -1 would wait the entire time specified by the Auto-wait timeout project setting */ Sys.Refresh(); }