Forum Discussion
kashikar_harsh
14 years agoContributor
Try using while (!Sys.Process("CDS").VBObject("frmStartup").Exists || !Sys.Process("CDS").VBObject("frmOpenOrDelete").exists) off course with some timeout. So your function may look like
var timeout = 0;
While (timeout < 100)
{
if ( !Sys.Process("CDS").VBObject("frmStartup").Exists || !Sys.Process("CDS").VBObject("frmOpenOrDelete").exists)
break;
timeout++
}
if ( timeout == 100 )
{
Log.Error ("No window exists");
}
var timeout = 0;
While (timeout < 100)
{
if ( !Sys.Process("CDS").VBObject("frmStartup").Exists || !Sys.Process("CDS").VBObject("frmOpenOrDelete").exists)
break;
timeout++
}
if ( timeout == 100 )
{
Log.Error ("No window exists");
}