Share this page

# web_set_timeout

Specifies the maximum amount of time that a script waits for the specified operation to be performed.

## C Language

    int web_set_timeout( const char *Action, const char *TimeOut);

Replay Functions

## Java Language

    int object.set_timeout( String Action, String TimeOut);

Replay Functions | Java Syntax

Argument | Description
--- | ---
object | An expression evaluating to an object of type WebApi. Usually web for Java. See also Function and Constant Prefixes.
Action | Identifies the operation to which the timeout applies. The available string values are: CONNECT To establish the connection to the web server. RECEIVE Time–out on the next "portion" of server response to arrive. STEP Time–out on each VuGen step.
TimeOut | The time–out time (in seconds).

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

## Parameterization

The following argument(s) can be parameterized using standard parameterization: Action, TimeOut

## General Information

The web_set_timeout function specifies the maximum amount of time that to wait for a CONNECT, RECEIVE, or STEP operation to be performed.

This function is supported for all web scripts.

## C Example

The following example sets the maximum time that a script waits to connect to the server as 60 seconds:

    web_set_timeout("CONNECT", "60");

## Java Example

The following example sets the maximum time that a script waits to connect to the server as 60 seconds:

    web.set_timeout("CONNECT", "60");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: