Record a script with the LoadRunner Web Recorder

The LoadRunner Web Recorder enables you to record your business process into a HAR file, and convert it into an executable Vuser script.

Note:  

  • This feature is provided as tech preview.

  • Running the LoadRunner Web Recorder automatically from the Start Recording dialog box is supported from version 24.3.

 

About the LoadRunner Web Recorder

The LoadRunner Web Recorder enables you to record events on your web browser into a HAR file, and then convert the file to an executable Vuser script. This can be useful if your environment does not allow you to record on a web browser, or if your company's security policy blocks the standard VuGen recorder.

The LoadRunner Web Recorder installs a Chrome web browser extension to record the HAR file. You can run the LoadRunner Web Recorder process from VuGen to automatically install the extension, record the HAR file, and then generate the end Vuser script.

Alternatively, you can manually install the browser extension and record the HAR file. You can then use the VuGen traffic analyzer to generate a Vuser script.

The extension is supported for the following protocols:

  • Java over HTTP

  • SAP - Web

  • Siebel - Web

  • Web - HTTP/HTML

Back to top

Automatically create a Vuser script with the browser extension

Version support: This process is supported from version 24.3.

The following procedure describes how to run the LoadRunner Web Recorder from the script editor to create a Vuser script. The Chrome extension is loaded for the current browser instance only.

Note: By default, Chrome does not enable extensions in Incognito mode. To use Incognito mode when recording, it must be manually enabled for the LoadRunner Web Recorder. For details, see Manually install the browser extension.

To create a Vuser script using the browser extension:

  1. Open a new script in the VuGen script editor. For the supported protocols, see About the LoadRunner Web Recorder.

  2. Click the Record button to open the Start Recording dialog box.

  3. In the Record field, select Web Browser via Extension.

  4. Click Start Recording. The LoadRunner Web Recorder recording window and the Chrome browser are both opened.

  5. Click Start Recording in the recording window.

  6. Open a second tab in Chrome and enter a URL or browse to a web site. When you see the tab displayed in the Recording Tabs list, you know it has been captured.

    • Within the browser, start performing the business processes that you want to record.

    • Use the recording window buttons to add actions, transactions, rendezvous points, and comments. For details on UI elements, see Web Recorder recording window.

  7. Click Stop Recording. In the resulting popup dialog, enter a name for the HAR script file and click OK.

    The HAR file is saved by default in the Downloads folder on the VuGen machine.

  8. VuGen begins analyzing the HAR traffic file and generates the code into the open script in the VuGen script editor.

Note:  

  • By default, Chrome saves downloads to the C:\Users\(your user)\Downloads folder. VuGen looks for the HAR file in this location. Make sure your Chrome browser is set to the default location, so that VuGen can find the file.

  • Make sure you use a unique name for the HAR file. If a file with the same name already exists in the Downloads folder, the new file is saved with a number (for example, mytest (1).har). VuGen will still look for the original file name (mytest.har) when creating the Vuser script, and so will use the wrong file.

Back to top

Manually install the browser extension

You can manually install the standalone version of the LoadRunner Web Recorder browser extension, and use it with your Chrome browser to generate HAR files. The extension can be installed permanently on the browser, or loaded for the current browser instance only.

To install the browser extension:

  1. In the VuGen installation package, locate the archive file:

  2. DVD\Additional Components\ChromeRecorder\ChromeRecorder.zip

    Copy the file to a local folder and extract its contents.

  3. Install the extension:

    • To permanently install the extension on Chrome, open the Chrome manage extensions page in Developer mode. Load the unpacked extension.

    • To load the extension for the current browser instance, run the following from the command line:

    chrome.exe --load-extension=<path-to-extension>

  4. (Optional) If you want to use the browser extension in Incognito mode:

    1. On the Chrome manage extensions page, locate the LoadRunner Web Recorder and click Details.
    2. Enable the Allow in Incognito option.

Back to top

Record a HAR file with the browser extension

You use the LoadRunner Web Recorder extension to record events in the Chrome browser, and generate a HAR file.

The HAR file can be converted into an executable Vuser script in VuGen.

To record a HAR file using the browser extension:

  1. After installing the LoadRunner Web Recorder on the machine, open it from the Chrome browser extensions list. The recording window opens.

  2. Click Start Recording.
  3. In your Chrome browser, open a new tab. Enter a URL or browse to a web site.
  4. Within the browser, start performing the business processes that you want to record.

    Use the recording window buttons to add actions, transactions, rendezvous points, and comments. For details on UI elements, see Web Recorder recording window.

  5. Click Stop Recording. In the resulting popup, enter a name for the HAR script file and click OK.

    The <script-name>.har file is saved in your Downloads folder.

  6. To convert the HAR file into a VuGen script, see Create a Vuser script by analyzing a captured traffic file.

Back to top

Web Recorder recording window

The LoadRunner Web Recorder recording window enables you to control the recording of your HAR file, and provides access to common commands used for Vuser scripts.

User interface elements are described below:

UI Element Description
Start Recording/Continue Recording Starts recording, or resumes after recording was paused.
Pause Recording Pauses the recording.
Stop Recording Stops recording and starts generation of the HAR file.
Capture Response Body When selected, the entire body is captured from the HTTP response.
Start Transaction

Enables you to mark the beginning of a transaction and specify the transaction name.

For details, see Using transactions.

End Transaction

Enables you to end the transaction listed in the transaction box.

<Transaction box>

Displayed when one or more transactions are active. Opens a dropdown, allowing you to select the transaction you want to end.
Add/Switch to action Enables you to specify a new action into which you want to record. The name of the added action is displayed to the left of the Add/Switch to action button.
Insert Rendezvous

Enables you to insert a Rendezvous point into your script.

For details, see Rendezvous points.

Insert Comment Enables you to insert a comment into your script.

Back to top

Known issues

The following notes and limitations apply when recording with the Chrome browser recording extension:

  • When the LoadRunner Web Recorder is in use, you may see messages about the operation of the extension. You must allow the extension functionality to continue, so that it does not block recording.

    For example:

    • LoadRunner Web Recorder started debugging the browser: Leave the debugger running, do not cancel.

    • This page was changed by the LoadRunner Web Recorder extension: Select to keep it, do not change it back.

  • The first blank page opened with the browser will not be recorded. Open a new tab to begin recording events.

  • Subsequent browser tabs must be opened manually to be recorded by the Web Recorder. To open links in a new tab, copy the link address, open a new tab, and paste in the URL.

  • WebSocket events are not supported.

  • Authorization headers are not recorded, since they are filtered out by Chrome.

  • Certain HTTP/HTTPS events, as defined by Chrome, may not contain a response body.

Back to top

See also: