Har file in project src folder not working

35 views
Skip to first unread message

satheesh kumar

unread,
Jan 31, 2013, 12:48:42 PM1/31/13
to http-archive-...@googlegroups.com
public class Example  {
           public static void main(String[] args) {
           FirefoxProfile profile = new FirefoxProfile();

    File firebug = new File("firebug-1.10.0a11.xpi");
    File netExport = new File("netExport-0.8b22.xpi");

    try
    {
        profile.addExtension(firebug);
        profile.addExtension(netExport);
    }
    catch (IOException err)
    {
        System.out.println(err);
    }

    // Set default Firefox preferences
    profile.setPreference("app.update.enabled", false);

    String domain = "extensions.firebug.";

    // Set default Firebug preferences
    profile.setPreference(domain + "currentVersion", "2.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", "C:\\Downloads\\_har\\");

    WebDriver driver = new FirefoxDriver(profile);

    try
    {
        // Wait till Firebug is loaded
        Thread.sleep(5000);

        // Load test page
        driver.get("http://www.janodvarko.cz");

        // Wait till HAR is exported
        Thread.sleep(10000);
    }
    catch (InterruptedException err)
    {
        System.out.println(err);
    }

    driver.quit();
}

Instead of C:\Downloads\_har\ i need to have it in my src folder. But its not storing the file in the src location.
Reply all
Reply to author
Forward
0 new messages