Forum Discussion

bharat_sethi's avatar
bharat_sethi
Occasional Contributor
10 years ago
Solved

TestComplete fails to identify objects in second Execution and require a restart of testcomplete

Hi, This is been a very different behaviour for which i am strugling to understand. TestComplte runs fine for very fist iteration for one screen but in second itegartion it stops identifing object from named map and when restrated back it undestand from named map as well.



This does the same when executing the script it just fails with message object not found.



Please refer to the screen cast below and help me understand wht is wrong here.



http://screencast.com/t/Nr4xPYFks8





  • I see in your name mapping that there are two branches for

    SwingObject("Dialog") 

    and in the video you are always choosing the second one.



    If the first branch is actually a different object that you've defined, make sure that the two branches have unique properties at some point, otherwise TestComplete may confuse them.  You are selecting one thing and TestComplete thinks you want the other one.



    If the first one is a duplicate and is not something you need, then delete it out of the name mapping and see if that fixes your problem.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    I see in your name mapping that there are two branches for

    SwingObject("Dialog") 

    and in the video you are always choosing the second one.



    If the first branch is actually a different object that you've defined, make sure that the two branches have unique properties at some point, otherwise TestComplete may confuse them.  You are selecting one thing and TestComplete thinks you want the other one.



    If the first one is a duplicate and is not something you need, then delete it out of the name mapping and see if that fixes your problem.
  • bharat_sethi's avatar
    bharat_sethi
    Occasional Contributor
    Hi,



    This was an issue with the product under test as it was not destroying the object(Dialog) once task is finished and TestComplete was getting confused which one to pick as there was nothing different then the ID (dynamic).



    In order to correct this after completing the task I have used dispose method of the object to destroy the dialog from memory and then TestComplete started working fine.



    So the learning here is look for object browser for available objects during execution and may need to dispose them manually if Dev  has missed to destroy them.



    Regards,

    Bharat