Here is my selenium testng script and XML file. I am getting the error message. Please help me how to proceed this
Err MSG : Parameter 'Name' is required by @Test on method parametertest but has not been marked @Optional
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class Sampleparameterized {
@Test
@Parameters("Name")
public void parametertest(String Name) {
System.out.println("Parameterized value is " +Name);
}
}
XML file is
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="Test">
<parameter name = "Name" value ="TOM"/>
<classes>
<class name="Testing.Sampleparameterized"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->