How do I capture network logs in HAR format with MSTest?

How can I capture network logs in HAR format while using C# MSTest?

Hi Mark,

To achieve this, you need to add the capability “network.har” : true along with "network" : true. This would give you the logs in both JSON and HAR format.

capabilities.SetCapability("platform", "Windows 11");
capabilities.SetCapability("browserName", "Chrome");
capabilities.SetCapability("version","104.0");
capabilities.SetCapability("network",true);
capabilities.SetCapability("network.har", "true");