How to launch Firefox Browser using Selenium ?

package SeleniumLearn.COM;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterTest;

public class LaunchFirefoxBrowser {
    public WebDriver driver;
  @Test
  public void LaunchFirefoxBrowser() {
      driver.get("http://www.seleniumlearn.com");
  }
  @BeforeTest
  public void beforeTest() {
      driver= new FirefoxDriver();
  }

  @AfterTest
  public void afterTest() {
  }

}

Tags: