Ask a Question

Another WaitWindow/Exists thread

redsgt
Occasional Contributor

Another WaitWindow/Exists thread

As far as I know from searching around here, the following should work:


var x;

  x = Aliases["BLAH32"]["dlgBlah"]["WaitWindow"]("Static", "blah blah blah.", 2, 1000);

  if (!x["Exists"]) 


{


//Do whatever


}


The line with WaitWindow always gives a "the object does not exist" error.  It also seems to wait longer than 1000 before it fails.

4 REPLIES 4
tppegu
Contributor

WaitWindow doesn't raise an error if it fails to find the desired object. That implies that the error is coming from this part:

Aliases["BLAH32"]["dlgBlah"]



That's the object that doesn't exist. TC is taking some time to find it (the "Auto-wait timeout" defined in your project properties), failing to find it, then because you are trying to call a method of the missing object, you get the error.
YMinaev
Staff

Hi,



Try using WaitAliaChild to obtain 'BLAH32' and 'dlgBlah'. If this doesn't help, check by what properties they're mapped in Name Mapping. Perhaps, you use some unreliable properties such as Index, and their actual values don't match the stored ones.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
redsgt
Occasional Contributor

Thanks for the replies.  WaitAliasChild didn't work for me.  Probably because I was messing something up. 🙂


Here's what did work for me:


var x;

  x = Aliases["Blah32"]["WaitWindow"]("#32770", "Blah", 1, 1000);

if (!x["Exists"])

{


//Do something


}

YMinaev
Staff

Hi,



It looks like the recognition parameters in Name Mapping are incorrect. Try checking the 'dlgBlah' dialog's properties in Name Mapping and see what values they have.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: