Forum Discussion

soda's avatar
soda
Contributor
14 years ago

Process Tree is not refreshing automatically in TestComplete 9

From the experience running our tests in TC7 and TC8, it seemed that when the tests executed a menu selection such as File->Open, the process tree was automatically refreshed, and the Open dialog could be found by the next statement in our test script.



In TestComplete 9, we are noticing that the dialog is no longer found until we add the statement Sys.Refresh();  The tests have not changed for two versions of TC.  Is the behavior different in TC9?  Did I have a setting in the properties that caused TC 7 and 8 to automatically refresh the process tree in Windows?  I really do not want to go through hundreds of lines of code adding Sys.Refresh statements for dialogs that suddenly cannot be seen.



As far as I know, I upgraded the NameMapping correctly from the previous TC8 project file.



Thanks for any suggestions.

Mark

5 Replies

  • soda's avatar
    soda
    Contributor
    It seems that this problem is mainly occuring when we use WaitNamedChild().exists in an If statment. It is a problem beyond just dialogs.



    If we add the Sys.Refresh() before the if(object.WaitNamedChild("name", 0).exists statement, things work fine.



    We would rather not go through the code adding Sys.Refresh() all over when they have not been needed in previous versions of TC.



    Is there a global preference in TC9 we are not setting or something to cause object refreshes automatically?



    Thanks,

    Mark

  • soda's avatar
    soda
    Contributor
    More related information.  If we set a breakpoint at the point where we use WaitNamedChild, the Object Browser actually has been populated with the object were are looking for, but the NameMapping file does not seem to think it is available.  I right clicked in the NameMapping file on the expected object and "Highlight On Screen" was grayed out, but in the Object Browser, I was able to highlight the object.

    Has anyone else seen this?Thanks

  • Hello Mark,

    I have sent you a patch in response to the submitted support case of yours. Please let me know whether it helps.

  • ben_hansen's avatar
    ben_hansen
    New Contributor
    Is it possible to get a copy of that patch also? I seem to be experiencing a similar problem.

  • Hi Ben,



    That patch fixes a problem of TestComplete 9.0, while the latest version of the tool is 9.20 that has this issue fixed. So, you can just upgrade your instance of the tool. If you cannot do this for some reason, please contact our support team directly and explain why you need the patch and cannot upgrade to version 9.20.