nastester
3 years agoRegular Contributor
Batch file closing before completing all steps
I have a batch file in TestedApps which I am executing via a script.
It is running/opening but seemingly only running the first command I have and then closing and the test is marked as successful. If I run the bat through Windows and not TC, it runs the whole thing fine.
How can I get TC to run this whole script without stopping/closing?
I was able to solve this issue with this script:
function Setup() { //Run bat file from TestedApps var app = TestedApps.Items(0); app.Run(); Delay(5000); Sys.Refresh(); //Map console object var p = NameMapping.Sys.cmd.wndConsoleWindowClass; while (p.Exists) { //while bat is open, keep test running. Looks for text within the console window var IsOpen = p.WaitProperty("wText", "*Deleting dashboard records*", 1000); if (IsOpen == false) break; Aliases.cmd.RefreshMappingInfo(); } }