package com.gloryroad.Demo;



import java.io.File;

import java.io.IOException;



import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.firefox.FirefoxProfile;

import org.openqa.selenium.firefox.internal.ProfilesIni;

import org.testng.annotations.AfterMethod;

import org.testng.annotations.BeforeMethod;

import org.testng.annotations.Test;



public class PersonTest {

String url="http://www.sogou.com";

public WebDriver driver;

@BeforeMethod

public void setUp(){




}



@AfterMethod

public void tearDown(){

driver.close();

}


@Test

public void PersonTest() throws IOException{

//
ProfilesIni pro=new ProfilesIni();

//


FirefoxProfile fox=new FirefoxProfile();

fox.addExtension(new File("C:\\Doload\\firebug.xpi"));//这个是firebug的路径,注意版本要对应

fox.setPreference("browser.startup.homepage",url);

driver=new FirefoxDriver(fox);









}



}