Return and Exit Statements - WinRunner

The return statement is used exclusively in functions. The syntax is:

return ( [expression] );

This statement passes control back to the calling function or test. It also returns the value of the evaluated expression to the calling function or test. If no expression is assigned to the return statement, an empty string is returned.

The texit statement can be used to stop a function or test run. The syntax is:

texit ( [ expression ] );

When a test is run interactively, texit discontinues the test run entirely. When a test is run in batch mode, the statement ends execution of the current main test only; control is then returned to the calling batch test. The texit function also returns the value of the evaluated expression to the calling function or test.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics