FirefoxProfile profile = new FirefoxProfile();
if (cleanHarFile()) {
File firebug = new File(System.getProperty("user.dir") + "/src/test/resources/firebug-2.0.7.xpi");
File netExport = new File(System.getProperty("user.dir") + "/src/test/resources/netExport-0.9b6.xpi");
try {
profile.addExtension(firebug);
profile.addExtension(netExport);
} catch (IOException e) {
e.printStackTrace();
}
profile.setPreference("app.update.enabled", false);
//Setting Firebug preferences
profile.setPreference("extensions.firebug.currentVersion", "2.0.7");
profile.setPreference("extensions.firebug.addonBarOpened", true);
profile.setPreference("extensions.firebug.console.enableSites", true);
profile.setPreference("extensions.firebug.script.enableSites", true);
profile.setPreference("extensions.firebug.net.enableSites", true);
profile.setPreference("extensions.firebug.previousPlacement", 1);
profile.setPreference("extensions.firebug.allPagesActivation", "on");
profile.setPreference("extensions.firebug.onByDefault", true);
profile.setPreference("extensions.firebug.defaultPanelName", "net");
profile.setPreference("extensions.firebug.netFilterCategories", "image");
profile.setPreference("extensions.firebug.net.logLimit", "3000");
// Setting netExport preferences
profile.setPreference("extensions.firebug.netexport.alwaysEnableAutoExport", true);
profile.setPreference("extensions.firebug.netexport.showPreview", false);
profile.setPreference("extensions.firebug.netexport.pageLoadedTimeout", 0);
profile.setPreference("extensions.firebug.netexport.secretToken", "harFile");
profile.setPreference("extensions.firebug.netexport.defaultLogDir", HARFILEDIR);
profile.setPreference("extensions.firebug.netexport.saveFiles", true);
during my test I'm calling
js.executeScript("window.NetExport.triggerExport(\"harFile\")");but NO Har file is saved and getting: TypeError: window.NetExport is undefined
Can some one help me ?Thanks
--
You received this message because you are subscribed to a topic in the Google Groups "Firebug" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebug/POY5S7xuzqY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/78f88dd2-7639-48c2-8af6-3beb1ebaa512%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to firebug+unsubscribe@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To unsubscribe from this group and all its topics, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
Good day,I'm also encountering this issue; attached the FBTracing logs...I've set these on my profile:myProfile.SetPreference("extensions.firebug.netexport.secretToken", "abcde");myProfile.SetPreference("extensions.firebug.netexport.alwaysEnableAutoExport", true);myProfile.SetPreference("extensions.firebug.netexport.autoExportToFile", false);myProfile.SetPreference("extensions.firebug.netexport.autoExportToServer", false);
--
You received this message because you are subscribed to a topic in the Google Groups "Firebug" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebug/POY5S7xuzqY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/51ac2515-569f-4c98-9a06-6478043a6804%40googlegroups.com.
I had it as true in my test.I just run again my tests and got org.openqa.selenium.WebDriverException: window.NetExport is undefinedbut I have no FBTrace...
deactivate autoExport then activate it again fix the problem and then export the file
--
You received this message because you are subscribed to a topic in the Google Groups "Firebug" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebug/POY5S7xuzqY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/35721cd4-0347-4b92-9b2f-d3b5053de278%40googlegroups.com.
Hi Honza
var options = { token: "test", // Value of the token in your preferences getData: true, // Set to true if you want to also get HAR data title: "my custom title", // Title used for the HAR file jsonp: false, // Set to true if you want HARP fileName: "my test har file %Y, %H:%M:%S" // Name of the file }; HAR.triggerExport(options).then(result => { console.log(result.data); });
Honza
Note that you need Firefox 42+ (to run this extension)