Ask a Question

Object recognition hint fired in wrong place

Valued Contributor

Object recognition hint fired in wrong place

In my application if I had error dialog box  appears test fails.

But warning dialog box comes test ok and con be continue..

  if (Aliases....dlgError.WaitProperty("Exists",true,1500)){
      return false;
  Else  (Aliases.....dlgWarning.WaitProperty("Exists",true,300)){
       return true; }


in TC 11.3 it worked nicely but TC12.1 gives me warning.....Capture1.PNG

mapping for both dialog boxes are same but different Windcaption.


anybody got a simple solution rather than writing new event?


Frequent Contributor

I recommend you change 


line to 



In this case you won't wait for project 'playback timeout' if the error doesn't exist. By default it's 10000ms and may slowdown your test.

Esteemed Contributor

Just as a general note:

You can't test for the values of the "Exists" property of an object if the object does not actually exist. If it doesn't exist, there is no way to look at the property.  This is why functions like WaitAliasChild were created... they look for the object in question... if it is present within the given timeout, then it returns the object. If it is not present, it returns an empty "stub" object with an Exists property with the value of "false".

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Showing results for 
Search instead for 
Did you mean: