Forum Discussion

mpstrong's avatar
mpstrong
New Contributor
12 years ago

Object listed multiple times in the Object Browser

I have run across an issue when writing test scripts for one of my applications.  If I open a window and then close the window, the object remains listed in the object browser.  If I open that window again, there will be two of the same nomes objects open in the object browser.  The only difference is the ID number.  I can work around this problem by closing the application completely and then rerunning it.  This is tedious and makes writing tests moredifficult, since I have to run the entire test each time, not just the subroutine I am working on.



I assume that this is an application issue where it is not cleaning up after itself.  I would think that when the window is closed, the object in the object browser should disappear.  I just wanted to make sure nobody else has seen this behavior before I go talk to the developers.



Thanks for your help,



Mike Strong

P2 Energy Solutions

3 Replies

  • Hi,



    This behavior comes from the tested application because TC doesn't control what GUI objects are present in the object tree. The object tree contains only objects which actually exist in your application. Most probably, windows are not disposed when you close them, they just become invisible.
  • Yes it happens. It create multiple objects but you can handle this by cheking the property Visible.

    The Visible should be true for the one exists and false for others. If it is true for more than two same controls, then definitely this is a problem.



    regards,

    Saurabh
  • mpstrong's avatar
    mpstrong
    New Contributor
    Thanks for your comments.  The developers have verified that objects that get closed do not completely disappear.  I will just have to work around that when writing the tests. Thanks for the pointer to the Visible property.  I should be able to make good use of that.



    Mike