Haiyangwhu
12 years agoContributor
Test complete hangs when calling Exists property of an object
I have a test need to launch a installer, following a function to check whether the installer is successfully launched or not.
The WaitProperty doesn't work for me:
return Aliases.BISuiteServerInstaller.WaitProperty("Exists", true, 180000);
So i use while instead:
var i = 0;
while (!Aliases.BISuiteServerInstaller.Exists)
{
Log.Message(" ==> " + i);
Delay(6000, "Delay 6 seconds to wait for installer being launched.");
i++;
if (i > 30)
{
break;
}
}
Log.Message(" ==> Aliases.BISuiteServerInstaller.Exists = " + Aliases.BISuiteServerInstaller.Exists + " Visible = " + Aliases.BISuiteServerInstaller.Visible);
return Aliases.BISuiteServerInstaller.Exists;
I have met twice with the situation below:
step into first loop and output " ==> 0" in log, then test complete hung at statement "while (!Aliases.BISuiteServerInstaller.Exists)" for 50 minutes, then the whole case timed out (50 minutes).
Also i have another try with below, and it also hung for 50 minutes:
return NameMapping.Sys.ToadBISuiteServerInstaller.WaitNamedChild("BISuiteServerInstaller", 120000).Exists && NameMapping.Sys.ToadBISuiteServerInstaller.WaitNamedChild("BISuiteServerInstaller", 120000).VisibleOnScreen;
Can someone show me what's going wrong here?
The WaitProperty doesn't work for me:
return Aliases.BISuiteServerInstaller.WaitProperty("Exists", true, 180000);
So i use while instead:
var i = 0;
while (!Aliases.BISuiteServerInstaller.Exists)
{
Log.Message(" ==> " + i);
Delay(6000, "Delay 6 seconds to wait for installer being launched.");
i++;
if (i > 30)
{
break;
}
}
Log.Message(" ==> Aliases.BISuiteServerInstaller.Exists = " + Aliases.BISuiteServerInstaller.Exists + " Visible = " + Aliases.BISuiteServerInstaller.Visible);
return Aliases.BISuiteServerInstaller.Exists;
I have met twice with the situation below:
step into first loop and output " ==> 0" in log, then test complete hung at statement "while (!Aliases.BISuiteServerInstaller.Exists)" for 50 minutes, then the whole case timed out (50 minutes).
Also i have another try with below, and it also hung for 50 minutes:
return NameMapping.Sys.ToadBISuiteServerInstaller.WaitNamedChild("BISuiteServerInstaller", 120000).Exists && NameMapping.Sys.ToadBISuiteServerInstaller.WaitNamedChild("BISuiteServerInstaller", 120000).VisibleOnScreen;
Can someone show me what's going wrong here?