Hi! i hade the same problem so i added:
ProfilesIni profile1 = new ProfilesIni();
profile = profile1.getProfile("default");
first and then set the preferences.
now the export starts for me.
Den tisdag 16 december 2014 kl. 10:20:24 UTC+1 skrev Arie Hoenel:
>
> Hi
>
> I'm trying during Selenium tests to export net console to Har file.
> My configuration is: FF 34.0.5 + Firebug 2.0.7 + netExport-0.9b6
>
> here my code:
>
> 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 the Google Groups
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
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/6d87a995-4dea-4787-96ee-b478d42b0680%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.