Here is my Testng.xml Suite
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite1" verbose="1">
<test name="LoginTest">
<parameter name="ExcelPath" value="D:/DataExcel.xls" />
<classes>
<class name="com.idp.testcases.TestCaseDemoFlow" />
</classes>
</test>
Here is part of my TestCase Class
@Test(priority = 1, dataProvider = "SDLogin",dataProviderClass=ExampleDataProvider.class)
public static void testLogin(String myAccountName, String myAccountPassword)
{
System.out.println("myAccountName="+myAccountName);
System.out.println("myAccountPassword="+myAccountPassword);\
}
My Question is How do I pass the ExcelPath Parameter from xml suite to the Test along with the Dataprovider?
Or if not possible
Is it possible to pass the Excelpath in the Dataprovider without mentioning the TestCasedemo class within the DataProvider?