NOTICE: Our Community is moving. Get more information. Updated information on a New Login Process
When attempting to execute a batch file which includes a TIMEOUT in invisible mode using the Sys_Execute() function, then the batch file will not run and Silk Test proceeds to the next step in the script.
This is known limitation with using a TIMEOUT in a batch file and is not an issue caused by Silk Test.
When TIMEOUT is executed in a background batch script, it will result in "ERROR: Input redirection is not supported, exiting the process immediately.". The TIMEOUT command will run OK in a console or terminal session.
When TIMEOUT is executed, it tries to redirect the input. The command is waiting for the user to interrupt the wait period. This is not possible if the command is executed in the background(invisible mode). It does not have any possibility of retrieving input and fails immediately. This is as designed for the TIMEOUT command in Windows.
You can verify this by returning the output from the command line using Sys_Execute()
[ ] LIST OF STRING lsOutPut [ ] [ ] Sys_Execute("C:\cmd.bat", lsOutPut) [ ] [ ] print(lsOutPut)
This should return the error "ERROR: Input redirection is not supported, exiting the process immediately" in the Silk Test results.
To workaround this will have to use "start" in your command line. Alternatively, if you are looking to use TIMEOUT in a batch script to add a delay to your script, you can simply use a Sleep() call in your 4Test code instead to add a delay.
[ ] LIST OF STRING lsOutPut [ ] [ ] Sys_Execute("start C:\cmd.bat", lsOutPut) [ ] [ ] print(lsOutPut)