This is my script code. i am trying to extract data from excel sheet but there is an error saying exception in reading xlxs filenull
public class TC003_VerifyLoginWithDifferentRecords extends testbase {
public static final Logger log =
Logger.getLogger(TC003_VerifyLoginWithDifferentRecords.class.getName());
HomePage homepage;
@DataProvider(name = "logindata")
public String[][] getTestData()
{
String[][]testRecords = getData("TestData.xlsx","LoginTestData");
return testRecords;
}
@BeforeClass
public void setUp()
{
init();
}
@Test(dataProvider = "logindata")
public void TestLogin(String emailAddress, String Password)
{
log.info("================Starting VerifyLogin with Different
Records===================");
homepage = new HomePage(driver);
homepage.loginApplication(emailAddress,Password);
log.info("================Ending VerifyLogin with Different Records===================");
}
@AfterTest
public void endTest()
{
// driver.close();
}
This is mt testbase class where i have provided path of the excel sheet
public String[][] getData(String workbookname, String sheetname)
{
String path = "H:/JAVA TESTING CODES/UIAutomation/src/main/java/com/test/automation/UIAutomation/data"+workbookname;
excel = new ExcelReader(path);
String[][] data = excel.getDataFromSheet(workbookname, sheetname);
return data;
}