Sometimes, it is useful to create a HAR file to determine why we are seeing a network error when using a browser. A HAR (HTTP Archive) file provides valuable information about network requests and responses. Please use the below example to create a HAR file using Chrome.
Using Google Chrome
- Right-click in the browser window or tab and select Inspect.
- Click the Network tab in the panel that appears.
- Navigate to the URL you want to traffic.
- Click the download button. (Export HAR appears when you hold the pointer over it.)
- Name the file.
- Click Save.
Also, it is worth mentioning that when running an automated browser test using Sauce Labs a HAR file is generated for the virtual browser in the session when the extendedDebugging capability is enabled as mentioned in our documentation here: https://docs.saucelabs.com/insights/debug/