Share this page

# web.stopAsync

Asynchronous Functions - JavaScript

Stops the specified Asynchronous Conversation An Asynchronous Conversation is a series of related web tasks, including tasks caused by redirection. An Asynchronous Conversation starts with the request for the desired response, includes all the requests and responses that are caused by this request (authentication, redirection, and so on) and ends when the desired response is received or when the series of interactions is canceled. including all its active and future tasks.

## Syntax

                web.stopAsync( id );

Argument | Description
--- | ---
id | The Conversation ID.

## Return Values

This function returns LR_PASS (0) if the Asynchronous Conversation is either confirmed to be cancelled or did not exist. Returns LR_FAIL (1) if an error occurred, as a result of which either the conversation was not canceled or it can not be confirmed that the conversation is cancelled.

## Parameterization

The values of keyword-value pairs can be parameterized. For example, "ALT={altParam}".

## xample: Asynchronous Conversations

Copy code

    //Automatically generated file for implementing asynchronous callback functions.
    //You can modify the automatically generated callback implementations or add new ones.
    //Asynchronous callback functions can be registered using web_reg_async_attributes steps.
                function Push_0_RequestCB()
                {

                lr.outputMessage(">>> Push_0_RequestCB");

                }

                function Push_0_ResponseHeadersCB(
                aHttpStatusCode,
                aAccumulatedHeadersStr,
                aAccumulatedHeadersLen)
                {
                //Enter your implementation for ResponseHeadersCB() here.

                lr.outputMessage(">>> Push_0_ResponseHeadersCB " + aHttpStatusCode + " / "
                + aAccumulatedHeadersStr.substr(0, 10) + " / "
                + aAccumulatedHeadersLen);

                }

                function Push_0_ResponseBodyBufferCB(
                aLastBufferStr,
                aLastBufferLen,
                aAccumulatedStr,
                aAccumulatedLen,
                aHttpStatusCode)
                {
                //Enter your implementation for ResponseBodyBufferCB() here.

                lr.outputMessage(">>> Push_0_ResponseBodyBufferCB "  + aLastBufferStr.substr(0, 20)
                + " / " + aLastBufferLen + " / " + aAccumulatedStr.substr(0, 20)
                + " / " + aAccumulatedLen + " / " + aHttpStatusCode);

                }

                function Push_0_ResponseCB(
                aResponseHeadersStr,
                aResponseHeadersLen,
                aResponseBodyStr,
                aResponseBodyLen,
                aHttpStatusCode)
                {
                //Enter your implementation for ResponseCB() here.

                //TODO - To make the script wait for a specific response, use web_sync in the relevant Action file.
                //See the Modifying Callbacks section in the VuGen Help Center for more details.
                lr.outputMessage(">>> Push_0_ResponseCB " + aResponseHeadersStr.substr(0, 20) + " / "
                + aResponseHeadersLen + " / " + aResponseBodyStr.substr(0, 20) + " / "
                + aResponseBodyLen + " / " + aHttpStatusCode);

                }

                function Action()
                {

                web.regAsyncAttributes(
                {
                id: "Push_0",
                pattern: "Push",
                url: "http://myserver.abc.com/cgi-bin/nph-pushJS_FF.exe",
                //requestCB: =Push_0_RequestCB",
                responseHeadersCB:    'Push_0_ResponseHeadersCB',
                responseBodyBufferCB:
                function Push_0_ResponseBodyBufferCB(
                aLastBufferStr,
                aLastBufferLen,
                aAccumulatedStr,
                aAccumulatedLen,
                aHttpStatusCode)
                {
                //Enter your implementation for ResponseBodyBufferCB() here.
                lr.outputMessage(">>> Push_0_ResponseBodyBufferCB " + aLastBufferStr.substr(0, 20)
                + " / " + aLastBufferLen + " / " + aAccumulatedStr.substr(0, 20)
                + " / " + aAccumulatedLen + " / " + aHttpStatusCode);
                }
                });

                web.url(
                {
                name: "push_to_iframe_new_object_FF.html",
                url: "http://myserver.abc.com/webgui/push/push_to_iframe_new_object_FF.html",
                resource: "0",
                recContentType: "text/html",
                snapshot: "t1.inf",
                mode: "HTML",
                });

                lr.thinkTime(30);
                web.stopAsync("Push_0");

                return 1
                }

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: