Now I use Selenium + FirefoxWebdriver(FF for mac 37.0.2 ) + Firebug 3. I 
wrote a Har file generator in Java and take the use of the code on your blog 
as the following. However, the new pref:  
extensions.firebug.netexport.defaultFileName dosen't work. Is there some 
thing wrong? Or is it necessary for me to use a format as you mention above?


       String url ="www.google.com";    

        // Set default Firefox preferences

        profile.setPreference("app.update.enabled", false);


        String domain = "extensions.firebug.";


        // Set default Firebug preferences

        profile.setPreference(domain + "currentVersion", "3.0.0");

        profile.setPreference(domain + "allPagesActivation", "on");

        profile.setPreference(domain + "defaultPanelName", "net");

        profile.setPreference(domain + "net.enableSites", true);


        // Set default NetExport preferences

        profile.setPreference(domain + "netexport.alwaysEnableAutoExport", 
true);

        profile.setPreference(domain + "netexport.showPreview", false);

        profile.setPreference(domain + "netexport.defaultLogDir", 
"~/project/har");

        profile.setPreference(domain + "netexport.defaultFileName", url);// 
Set the name of the har log file

                   

      //Set up the browser

        WebDriver driver = new FirefoxDriver(profile);

        driver.get(url);

在 2015年4月20日星期一 UTC+8下午10:41:27,Jan Honza Odvarko写道:
>
> Yes, it is now possible to provide a custom name.
>
> 1) There is a new pref:  extensions.firebug.netexport.defaultFileName
> You can set it to a string that is used as a format string for generating 
> the name
> An example: myname-%Y-%m-%d-endofthename
>
> Read more about the format:
>
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleFormat
>
> 2) You can pass name into NetExport.triggerExport()
>
> NetExport.triggerExport({
>   fileName: "myFileName"
> })
>
> NetExport is currently bundled in Firebug.next and this new feature is 
> available in alpha 10
> https://github.com/firebug/firebug.next/releases/tag/firebug-3.0.0-alpha.10
>
> Honza
>
>

-- 
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/a19cd9a6-9406-410b-891d-cd25afe8636d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to