automatic exit TSL execution if any error
I have written a scripts and in this script i want that winrunner should stop executing further statements if there is any problem in current statement
set_window ("abc", 2)
so if this window abc is not available in 2 secs then WR should exit and stop executing further statements.
like this any gui failure or verification failure link failure etc..
Is there any setting or option or one time statement to use in start of TSL...
(I dont want to check each and everywhere window link with if statements and exit)
Re: automatic exit TSL execution if any error
i got the solution.
1) make a compiled module with the name "tslExceptionCompileModule"
and write the below function throwError
function ThrowError (in rc)
tl_step("Error Function ",1,"There is any error while executing the test script");
2) In main script define TSL exception as below code
define_tsl_exception ("error_excp", "ThrowError", E_ANY_ERROR);
now it will stop execution if there is any error in execution of tsl statements