0
votes

Getting following error in eclipse"

1.The content of element type "suite" must match "(groups?,(listeners|packages|test|parameter|method-selectors| suite-files)*)".

2.If run erroneous testng.xml following error is thrown:

org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 11; Element type "listners" must be declared.

1
provide your testng.xml code and your listersclass and how used in tests - murali selenium
As I see You have element called "listners" and should be "listeners", missing letter "e" after "list" - Kovacic

1 Answers

0
votes

To call a listener, we need to mention it in the testng.xml with the proper listener tag

Ex:

<listeners>
        <listener class-name="TestNgListners.CustmoListner"/>
    </listeners>

The custom listner is created under the location "TestNgListners.CustmoListner"