0

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();
    }
}
MKay
  • 818
  • 9
  • 32
khanam
  • 335
  • 1
  • 4
  • 19
  • which line is getting npe – Shamik Dec 07 '15 at 07:54
  • I did not get any Null Pointer Exception. Can you post the stack trace? Or at least point out the line? – MKay Dec 07 '15 at 07:56
  • @mk08, When i click on Run Option one alert box coming in that showing as: An internal error occurred during: "Launching DemoTestNG". java.lang.NullPointerException – khanam Dec 07 '15 at 09:29
  • 2
    You should have a look on http://stackoverflow.com/questions/34050615/testng-an-internal-error-occurred-during-launching/34070227#34070227 – juherr Dec 07 '15 at 10:02

0 Answers0