How to Skip time delay
Hi Support,
I have faced one problem. We have used the below code in
Test Complete script. We are using BuildSample exe to compile the sample. It is
working fine, if we give time delay after the TestedApps["BuildSample"]["Run"]();.
It is a problem to maintain same time delay for all samples, since some samples
take much time to compile and if we provide max delay time it increases the
Automation time. Could you please update me any other solution?
function TC_1812()
{
var DefectInfo ="Defect ID : 1812 \n\nDescription :customer issues \n";
TestedApps["KillExeProcess"]["Run"]();
BuiltIn["Delay"](300);
TestedApps["BuildSample"]["Run"]();
Log["Message"](DefectInfo);
TestedApps["TA_1812"]["Run"]();
BuiltIn["Delay"](20000);
LLCollection1["LLP1_1812"]["Execute"](Sys["Process"]("1812")["WPFObject"]("HwndSource:Window1", "Test Application") "WPFObject"]("Window1","Test Application", 1));
BuiltIn["Delay"](1500);
var ImgPros =(Sys["Process"]("1812")["WPFObject"]("HwndSource:
Window1", "TestApplication")["WPFObject"]("Window1", "Test
Application", 1));
if(!Regions["Compare"](ImgPros,"1812", false, false,true, 0))
Failure("1812", ImgPros, DefectInfo)
if ( ! TestedApps["TA_1812"]["Close"]())
TestedApps["TA_1812"]["Terminate"]();
Log["Message"]("");
}