Package net.lightbody.wpd.utils

Source Code of net.lightbody.wpd.utils.Firebug

package net.lightbody.wpd.utils;

import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;

import java.io.File;
import java.io.IOException;

public class Firebug {
    public static void configure(File dir, DesiredCapabilities capabilities) throws IOException {
        FirefoxProfile profile = new FirefoxProfile();
        profile.addExtension(new File(dir, "firebug-1.9.2-fx.xpi"));
        profile.addExtension(new File(dir, "netExport-0.8b22.xpi"));

        profile.setPreference("extensions.firebug.defaultPanelName", "net");
        profile.setPreference("extensions.firebug.net.enableSites", true);
        profile.setPreference("extensions.firebug.allPagesActivation", "on");
        profile.setPreference("extensions.firebug.showFirstRunPage", false);
        profile.setPreference("extensions.firebug.netexport.defaultLogDir", "/tmp");
        profile.setPreference("extensions.firebug.netexport.saveFiles", true);
        profile.setPreference("extensions.firebug.netexport.alwaysEnableAutoExport", true);

        capabilities.setCapability(FirefoxDriver.PROFILE, profile);
    }
}
TOP

Related Classes of net.lightbody.wpd.utils.Firebug

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.