Forum Discussion

Patrice's avatar
Patrice
Contributor
14 years ago

Waiting for the "MyObjectName" Object but Object is already there !

Hi,



I run a script multiple times but for some reasons, it takes TestComplete ages to run step by step, For each line, i get an icon on the right top corner during playback to say that, it is waiting for the "MyObjectName" Object.



It does the same for Windows but i resolved it by adding a MyWindowName.Activate and it runs quicker but only for Windows not Objects.



Just wondering if there is a solution for Objects because it is very slow and i can't imagine running many many times all scripts at that speed.



Thanks for your help,

Patrice

6 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It all depends upon your machine, the application under test, and the way you are resolving the item in scripts.



    You will always get that prompt, but if the item already exists, it should not remain for long.  Your project has a default auto-time out setting (I think it defaults to 10000 milliseconds) so, at most, it will wait 10 seconds for the object to resolve and then it will generate an "object not found" error.



    Do you have an example of a function or procedure that you are executing that is giving this behaviour?  There may be some tweaks that can be done to speed things up a bit for you.
  • Hi,

    Thanks for your reply.



    So as an example the script is:



    Aliases.xxxx.xxxxx.xxxxx.MyButtonName.ClickButton



    It takes at least 5 to 10 seconds and yet the button is already there. 



    Let me know if you need anything else.



    Regards,

    Patrice


  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    And the ClickButton method call works fine without error?



    The problem may simply be the need for TC to interpret the string of objects up to the button.  There are a few articles up here on improving performance, you might want to do a quick search and see what you can find.  Otherwise, I think you've just got the standard overhead of TC resolving objects to be used in the automation.
  • Hi,



    Yes the ClickButton works fine.



    Not sure what you mean by "you've just got the standard overhead of TC resolving objects to be used in the automation."..would you mind to clarify please ?



    I'll have a look about improving performance.





    Thanks,

    Patrice
  • Check your project properties and see if you have Delay between events, key press delay... My memory is tickling that these impact playback speed, but cannot remember if the behavior is exactly what you describe.


  • Hi thanks,



    A slight improvement but not much when changing settings.

    I will take a look at the article about improving performance and also how the objects are mapped.



    Thanks,

    Patrice