How do I capture network logs in HAR format with C# xUnit?

Please let me know how to capture network logs in HAR format while using xUnit?

Hi Brett,

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("network.har", "true");