I'm Learning TestNG FrameWork From guru99.com, when i add some code and run as TestNG its showing error as Null Pointer excetion here is my code.
public class DemoTestNG {
public String baseUrl = "http://www.newtours.demoaut.com/";
WebDriver driver = new FirefoxDriver();
@Test
public void verifyHomePageTitle() {
driver.get(baseUrl);
String expectedTitle = "Welcome: Mercury Tours";
String actualTitle = driver.getTitle();
AssertJUnit.assertEquals(actualTitle, expectedTitle);
driver.quit();
}
}