Start next step only after batch file is complete
I am looking for a way (without using delays) to only start the next step in the test only if the previous step batch file has completed.
Solved! Go to Solution.
as @BenoitB says above, you need a marker of whatever process to indicate that the batch file has finished.
so whatever you are doing with the batchfile, I'm assuming there is a clear indicator of whatever process to have ran (or do whatever its supposed to do)
Then you can use the name mapping objects and their properties to find that same property, and provide it the conditional logic so that the next step continues on only after that one property is met. just a quick idea
Using a batch to create a file to mark it. But what would be the best way to have Testcomplete wait to check the existence of the file? The batch time to run can be variable especially on different computer builds, so I will need it to check continuously until file is there.
I found this script that might work. I cannot use absolute paths because the folder location of source control can vary for machines as well.
sPath = "c:\\MyFile.txt";
if (! aqFileSystem["Exists"](sPath))
aqFile["WriteToTextFile"](sPath, "Hello, world!" + "\r\n", aqFile["ctANSI"], false);
if you are using source control to pull the TC files to run, and you cannot define the absolute path, maybe you can use the dynamic properties like
sPath = project.path + "\\myBatch\\MyFile.txt"
if you include the batch file as a part of the repo you are pulling down?