I am new to Selenium WebDriver.

Prog:

```
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class sample1 
{
    @BeforeMethod
    public void BeforeMethod()
    {
        System.out.println("This is Before Method");
    }
    @Test
    public void f1()
    {
        System.out.println("This is f1 method");
    }
    @Test
    public void f2()
    {
        System.out.println("This is f2 Method");
    }
}

```

TestNG XML File:

```
<suite name="s1">
    <test name="t1">
        <Classes>
            <Class name="sample1" />
            <methods>
                <include name= "f1" />
                <include name= "f2" />
            </methods
        </Classes>
    </test>
</suite>

```

While executing the above xml file Java Null pointer error is displayed.

Can any one please help me.

Here is the Exeception getting:

`org.testng.TestNGException: java.lang.NullPointerException
 at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:341)
 at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
 at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
 at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
 Caused by: java.lang.NullPointerException
 at org.testng.xml.TestNGContentHandler.xmlMethod(TestNGContentHandler.java:456)
 at org.testng.xml.TestNGContentHandler.endElement(TestNGContentHandler.java:690)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknow n Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver .next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at org.testng.xml.XMLParser.parse(XMLParser.java:39)
 at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
 at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
 at org.testng.xml.Parser.parse(Parser.java:168)
 at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311)
 ... 3 more`

Thanks & Regards

I have changed the capital letters in the Tag names to small letters, Then i am getting the below exception:

```
org.testng.TestNGException: 
Cannot find class in classpath: ChangePage
    at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
    at org.testng.xml.XmlClass.init(XmlClass.java:73)
    at org.testng.xml.XmlClass.<init>(XmlClass.java:59)
    at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:543)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown     Source)
    at     com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown     Source)
    at     com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkn    own Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.testng.xml.XMLParser.parse(XMLParser.java:39)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
    at org.testng.xml.Parser.parse(Parser.java:168)
    at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

```