First we need to set internet explorer exe path and initiate Webdriver using below code.
public class BrowserStart {
public static WebDriver driver;
public static void loadbrowser () throws InterruptedException{
//Set Internetexplorer exe path..
File file = new File(System.getProperty("user.dir") + "/libs/IEDriverServer.exe");
System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
driver = new InternetExplorerDriver();
driver.get("http://www.google.com");
}
}
public class BrowserStart {
public static WebDriver driver;
public static void loadbrowser () throws InterruptedException{
//Set Internetexplorer exe path..
File file = new File(System.getProperty("user.dir") + "/libs/IEDriverServer.exe");
System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
driver = new InternetExplorerDriver();
driver.get("http://www.google.com");
}
}
No comments:
Post a Comment