Forum Discussion

rickh_28's avatar
rickh_28
Occasional Contributor
10 years ago
Solved

Objects Re-Named during test

One of the tests I have to run involves conducting a search on the database.  The results display in an infragistics grid view.  Said grid view displays in the Object Browser as:



WinFormsObject("iggrdGazetteer")



When I run the test, TC enters the search criteria and hits the search button.  The app then becomes unresponsive for about 80 seconds, then becomes responsive again.  I have that handled using a WaitAliasChild call.  The problem is that for some reason, when the app becomes responsive again, (according to the Object Browser) the grid view has changed its name to:



WinFormsObject("WindowsForms10.Window.8.app.0.3ce0bb8")



I attempted to handle THAT by adding a Refresh() and a RefreshNameMapping() after the WaitAliasChild, but it doesn't seem to do any good - my test still can't see the grid view. 



The only thing I've been able to find that can get the original name to display in TC is to close TC and re-open it.  That is obviously not really a good option for the test.



Thoughts?

4 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor
    Have you mapped same object two times?

    Check fist and second names are pointing to the same object
  • rickh_28's avatar
    rickh_28
    Occasional Contributor
    Tanya, I increased the Method Invoke Timeout to 10,000 and the test worked perfectly - at least for now :)



    Thanks!
  • I posted basically the same question a month or so ago, and got the same response: increase the timeout.



    I did that.  Set it to 30000.  It seemed to help a bit, but didn't solve the problem entirely.



    I've been reduced to adding logic in my tests that opens the form, checks for the right name, and then closes it and reopens it if it's wrong.  Sometimes it gets stubborn and I end up looping on opening and closing the form hundreds of times.  

    In the last two weeks I've seen individual controls being named wrong too, which makes running a test nearly impossible when it happens.



    This has been a problem for just about two months for me.  I haven't updated TestComplete since I migrated to v10 about five months ago.  

    I'm thinking it might be a problem with a recent Windows update or something.



    Is there some way to command TestComplete to discard its object browser data and then re-acquire it?  That might be better than continuously closing and opening a form to try and get TestComplete to recognize it...