Share this page

# Record and generate a script

You can create DevWeb scripts by recording your business process into a HAR or PCAP file, and then generating a script from the file. Recording is supported for the latest web technologies for HTTP, HTTPS, and HTTP/2 (and HTTP/3 with Wireshark), as well as for the WebSocket protocol (using the Proxy Recorder).

In this topic:

Tip: Check out the video: Tutorial #2: Creating a script.

## Recording with the DevWeb Proxy Recorder

The DevWeb Proxy Recorder enables you to record your business process from your chosen browser and export it to a HAR file. The Proxy Recorder is also available in VuGen.

For details, see DevWeb Proxy Recorder.

## Recording with a browser

Record your application using any browser and save the traffic to a HAR file.

Note: In some cases, the browser does not save the response headers and body in the HAR file. These parts of the response are sometimes required during script generation (for example, for application of correlation rules), and if the relevant response information is missing, the script may be generated incorrectly.

We recommend using the DevWeb Proxy Recorder to generate HAR files for your scripts.

To create a browser-generated HAR file:

1. In your browser's development tools, ensure that the following network settings are configured:

   - Logs are set to be saved

   - Cache is disabled
2. Make sure that the browser is recording traffic. If not, start the recording.
3. Perform the business process actions that you want to record. Wait for the business process to complete and for all the resources to finish uploading. Then save the traffic to a HAR file.
4. Use the Offline Script Generator tool to generate a DevWeb script from the HAR file.

Example: Recording in Chrome on Windows:

1. Start Chrome and press F12 on your keyboard to enable DevTools.
2. On the Network tab, select Preserve log and Disable cache.
3. Make sure that recording has started—indicated by the glowing circle on the top left of the DevTools pane. If it has not started, press Ctrl+E to start it.
4. When the business process is complete and all resources have finished uploading, right-click any line in the traffic area and select Save as HAR with content. Save the HAR file in the location of your choice.

## Recording with Fiddler

You can capture your HTTP(s) traffic using Telerik Fiddler, and export it to a HAR file.

By default, Fiddler only stores non-textual (binary) response body content smaller than 32KB. This limit can be increased by setting a Fiddler preference using the following string:

`fiddler.importexport.HTTPArchiveJSON.MaxBinaryBodyLength`

To create a HAR file through Fiddler:

1. Record your business process actions using Fiddler . Wait until the business process is complete, and all resources have finished uploading, before continuing.
2. Select File > Export Sessions > All sessions.
3. In the displayed Select Export Format dialog, select HTTPArchive v1.2 and click Next.
4. Save the HAR file to your chosen location.

5. Use the Offline Script Generator tool to generate a DevWeb script from the HAR file. The exported HAR does not contain a pages section.

   The created script will be URL-based.

## Recording with Wireshark

Note: This functionality is supported from version 26.3.

You can capture your network traffic using Wireshark, and use the output to generate a DevWeb script. Wireshark captures all types of HTTP traffic (HTTP, HTTP/2, HTTP/3, HTTPS) and generates a PCAP output file. For supported Wireshark versions, see the Supported Protocols document.

To create a DevWeb script, the recorded output can be saved in *.pcap or *.pcapng format, or exported as a PDML file (.xml format). The preferred format is PDML file, for the following reasons:

- For PCAP output, Wireshark TShark needs to be installed on the machine to generate a script, and the path to the TShark executable must be defined.

  When using PDML output, Wireshark installation is not needed when generating the script.

- For PCAP output, TShark is run in the background while generating the script. This can take several minutes.

  When using PDML output, there is no delay.

To create a DevWeb script using Wireshark:

1. Record your business process actions using Wireshark.

2. Save the recorded output to the local machine in *.pcap or *.pcapng format, or export the output as a PDML file (XML format).

3. Use the Offline Script Generator tool to generate a DevWeb script from the output file.

   If generating from PCAP format, make sure that TShark is installed locally, and that the TShark executable path is defined in the PATH environment variable.

## See also

- Get started

https://admhelp.microfocus.com Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Performance Engineering for Developers Help Center OpenText™ Performance Engineering for Developers Help 26.1-26.3 All View Local Help Center View Online Help Center Version: