java - Unable to solve the error of TestNGContent Handler in Selenium webdriver -
my xml file
<?xml version="1.0" encoding="utf-8"?> <suite name="dummy" parallel="tests" thread-count="1"> <parameter name="run_using_sg" value="n"/> <test name="verify launchapplication"/> <parameter name="browser_code" value="ff"/> <parameter name="url" value="http://demo.rtcamp.com/rtmedia/"/> <parameter name="title" value="rtmedia"/> <parameter name="platform" value="windows"/> <parameter name="version" value="any"/> <classes> <class name="modules.launchapplication"/> </classes> </test> </suite> <!--suite-->
my error
org.testng.testngexception: java.lang.nullpointerexception @ org.testng.testng.initializesuitesandjarfile(testng.java:341) @ org.testng.remote.remotetestng.run(remotetestng.java:88) @ org.testng.remote.remotetestng.initandrun(remotetestng.java:204) @ org.testng.remote.remotetestng.main(remotetestng.java:175) caused by: java.lang.nullpointerexception @ org.testng.xml.testngcontenthandler.xmlclasses(testngcontenthandler.java:342) @ org.testng.xml.testngcontenthandler.endelement(testngcontenthandler.java:693) @ com.sun.org.apache.xerces.internal.parsers.abstractsaxparser.endelement(unknown source) @ com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl.scanendelement(unknown source) @ com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$fragmentcontentdriver.next(unknown source) @ com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl.next(unknown source) @ com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl.scandocument(unknown source) @ com.sun.org.apache.xerces.internal.parsers.xml11configuration.parse(unknown source) @ com.sun.org.apache.xerces.internal.parsers.xml11configuration.parse(unknown source) @ com.sun.org.apache.xerces.internal.parsers.xmlparser.parse(unknown source) @ com.sun.org.apache.xerces.internal.parsers.abstractsaxparser.parse(unknown source) @ com.sun.org.apache.xerces.internal.jaxp.saxparserimpl$jaxpsaxparser.parse(unknown source) @ com.sun.org.apache.xerces.internal.jaxp.saxparserimpl.parse(unknown source) @ javax.xml.parsers.saxparser.parse(unknown source) @ org.testng.xml.xmlparser.parse(xmlparser.java:39) @ org.testng.xml.suitexmlparser.parse(suitexmlparser.java:17) @ org.testng.xml.suitexmlparser.parse(suitexmlparser.java:10) @ org.testng.xml.parser.parse(parser.java:168) @ org.testng.testng.initializesuitesandjarfile(testng.java:311) ... 3 more
i getting above error when going run test script testng.i getting error first time not sure it? when run test junit working fine not testng.i have checked xml file correct.any out this.
you trying close tag closed.
<test name="verify launchapplication"/>
and
</test>
Comments
Post a Comment