Getting error while running a XML file in TestNG

0 votes
org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 8; Element type "test" must be followed by either attribute specifications, ">" or "/>".

This is the error I am getting while executing a XML file for testNG.

Here is the code that I used:

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name = "TestNG">

    <test = "Testing TestNG">
    
        <classes>
        
            <class name = "testNG.AnnotationsDemo"/>
            
        </classes>
        
    </test>

</suite>

Can someone  help?

Dec 26, 2018 in Selenium by Sradha
• 1,710 points

edited Dec 26, 2018 by Sradha 144 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Hello @Sradha,

The synatx of using test is not correct.

The syntax goes like this

<test>

</test>

or

<test name = "name ">

</test>

Error that you are getting is because you missed the name tag in your test.

Hope this helped.
answered Dec 26, 2018 by Rashmi

Related Questions In Selenium

0 votes
1 answer

How to create a executable jar file for TestNG and the runnnig point should be the Xml file

Use Eclipse Export Wizard. While exporting, select "Create ...READ MORE

answered Aug 24, 2018 in Selenium by Meci Matt
• 9,400 points
837 views
0 votes
1 answer
0 votes
1 answer

TestNG error:- Cannot find class in classpath

The issue is because the project directory ...READ MORE

answered Mar 23, 2018 in Selenium by nsv999
• 5,030 points
4,315 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
73 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
446 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
55 views
+4 votes
1 answer
0 votes
1 answer

Getting error saying element not found in selenium

Hey @Jino, The things I figured out ...READ MORE

answered Dec 20, 2018 in Selenium by Shuvodip
70 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.