首页 > 代码库 > selenium-webdriver启动时开启firebug

selenium-webdriver启动时开启firebug

File file = new File("D:/software/firefox/firebug-2.0.16-fx.xpi");

FirefoxProfile profile = new FirefoxProfile();

profile.addExtension(file);

profile.setPreference("extensions.firebug.currentVersion", "2.0.16");//设置firebug版本

profile.setPreference("extensions.firebug.allPagesActivation","on");//设置firebug自动开启

driver = new FirefoxDriver(profile);

driver.get("http://192.168.2.128:8080/selenium/index.jsp");

driver.quit();

selenium-webdriver启动时开启firebug