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

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

Hi Joe!

It’s very simple to capture Network logs in HAR format with C#. You need to pass the Network capability as true and use the network.har capability as shown below:

capabilities.SetCapability(CapabilityType.BrowserName, "Chrome");
capabilities.SetCapability(CapabilityType.Version, "96");
capabilities.SetCapability(CapabilityType.Platform, "Windows 10");
capabilities.SetCapability(CapabilityType.network, "true");
capabilities.SetCapability(CapabilityType.network.har, "true");