Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97799

Running testng.xml file shows Invoked Methods error

$
0
0

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.


Viewing all articles
Browse latest Browse all 97799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>