Launch Internet Explorer browser using Selenium

package browsers;
import org.testng.annotations.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.annotations.BeforeTest;

public class IEbroweser {
    WebDriver driver;

@Test
    public void launchIEBrowser() throws Exception {
        driver.get("http://www.seleniumlearn.com");
    }

    @BeforeTest
    public void beforeTest() {
        System.setProperty("webdriver.ie.driver","D:\\lib\\IEDriverServer.exe"); //---> IE driver path
        driver = new InternetExplorerDriver();

        driver.manage().window().maximize();

    }

}

Comments