I am getting Null pointer exception of Driver when i am running selenium
with testng.xml
file, if i directly run Login class it works fine. Also when i remove groups tag from .xml file it is running .xml but i want to use groups.
below is texng.xml:
<groups>
<run>
<include name="Deal" />
</run>
</groups>
<classes>
<class name="jproject.Login" />
</classes>
</test>
My Login class is:
public class Login extends BClass{
@Test (priority=1, groups = { "Nat", "Deal" }) // (description="This TC will perform valid login")
public void LoginPage() throws InterruptedException
{
//Waits.loader(driver);
String expectedTitle = "Clearview | Dashboard";
String actualTitle = driver.getTitle();
Assert.assertEquals(actualTitle, expectedTitle);
Reporter.log("Application Logged in successfully | ");
}
}
In my Bclass i'm initializing driver and login under @BeforeSuite annotation.