Forum Discussion
Solved
There are timing issues that can affect checking for Exists. Please take a look here:
https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/checking-existence.html
Thanks and even i tried giving wait , but its not working
if(Sys.Process("*").WaitWinFormsObject("DisplayScheduleMessage", 1000).Exists)
{
Sys.Process("*").WinFormsObject("DisplayScheduleMessage").Close();
}
else
{
Log.Message("Programme assigned");
}
- tristaanogre7 years agoEsteemed Contributor
Keep in mind that Sys.Process('*') will return the first process it finds in the search... which may not be your application. You need to specify what process in order to detect the Winform.
Also... you say, "It's not working"... can you be more specific? What is happening? Any errors? What's in the log?