Share this page

# Ajax click & script example script

Caution: Click & Script protocols are supported for replay only. Support for these protocols will be discontinued in a future version.

We recommend that you migrate existing Ajax Click & Script scripts to another web protocol such as TruClient - Web (see TruClient - Web protocol) or Web - HTTP/HTML (see Web - HTTP/HTML protocol).

Ajax (Asynchronous JavaScript and XML) represents a group of technologies for creating interactive web applications. With Ajax, web pages exchange small packets of data with the server, instead of reloading an entire page. This reduces the amount of time that a user needs to wait when requesting data. It also increases the interactive capabilities and enhances the usability.

VuGen uses the control handler layer to create the effect of an operation on a GUI control. During recording, when one of the supported Ajax controls was encountered, VuGen generated a function with an ajax_xxx prefix.

In the following example, a user selected item number 1 (index=1) in an Accordion control. VuGen generated an ajax_accordion function.

    web_browser("Accordion.aspx",
                    DESCRIPTION,
                    ACTION,
                    "Navigate=http://labm1app08/AJAX/Accordion/.aspx",
                    LAST);
    lr_think_time(5);

    ajax_accordion("Accordion",
                       DESCRIPTION,
                      "Framework=atlas",
                      "ID=ctl00_SampleContent_MyAccordion",
                         ACTION,
                      "UserAction=SelectIndex",
                      "Index=1",
                      LAST);
    web_edit_field("free_text_2",
            "Snapshot=t18.inf",
            DESCRIPTION,
            "Type=text",
            "Name=free_text",
            ACTION,
            "SetValue=FILE_PATH",
            LAST);

Note: When you recorded an Ajax session, VuGen generated standard Click & Script functions for objects that are not one of the supported Ajax controls. In the example above, the word FILE_PATH was typed into an edit box.

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 25.1-25.3 All View Local Help Center View Online Help Center Version: