HAR.triggerExport(options).then(result => { }); not creating .har file under profile
I am using .net(c#) with Selenium for capturing the network log I have Firefox Developer Edition 69
FirefoxProfile profile = new FirefoxProfile(); var allProfiles = new FirefoxProfileManager(); profile = allProfiles.GetProfile("Selenium");
string harExport = "C:/Users/testUser/Desktop/harexport/harexporttrigger-0.5.0-beta.10.xpi"; profile.AddExtension(harExport);
profile.SetPreference("extensions.netmonitor.har.contentAPIToken", "test");
profile.SetPreference("extensions.netmonitor.har.autoConnect", true);
profile.SetPreference("devtools.netmonitor.har.defaultLogDir", "C:\Users\TestUser\AppData\Roaming\Mozilla\Firefox\Profiles\x7z2jjfb.Selenium");
profile.SetPreference("devtools.netmonitor.har.enableAutoExportToFile", true);
profile.SetPreference("devtools.netmonitor.har.forceExport", true);
fireFoxoptions.Profile = profile;
/// code to Generate har File
string sessionHar = " var options = { token: "test"}; " +
"HAR.triggerExport(options).then(result => { });";
if (WebDriver != null)
{
((IJavaScriptExecutor)WebDriver).ExecuteScript(sessionHar);
}
However its not creating a Har file under my profile when I execute the script from console
