limited time offer

How do you launch IE/Firefox/Chrome browser using Selenium?

Check below code:

WebDriver driver;

if(browser.equals("Chrome"))
{	
    System.setProperty("webdriver.chrome.driver", Constants.CHROME_EXE);
    driver = new ChromeDriver();
}
else if(browser.equals("Firefox")) 
{
    System.setProperty("webdriver.gecko.driver", Constants.FIREFOX_EXE);
    driver = new FirefoxDriver();
}
else if(browser.equals("IE"))
{
    System.setProperty("webdriver.ie.driver","Constants.IE_EXE");
    driver = new InternetExplorerDriver();
}