i have code for keyword driven framework with below piece of code with DriverScript class:
for (int iRow=1;iRow<=8;iRow++){
actionKeywords = new ActionKeywords();
method = actionKeywords.getClass().getMethods();
sActionKeyword = ExcelUtils.getCellData(iRow, Constants.Col_ActionKeyword);
sPageObject = ExcelUtils.getCellData(iRow, Constants.Col_PageObject);
execute_Actions();
}
And ExcelUtils class:
public static String getCellData(int RowNum, int ColNum) throws Exception{
Cell = ExcelWSheet.getRow(RowNum).getCell(ColNum);
String CellData = Cell.getStringCellValue();
return CellData;
}
Error displayed when executing this:
Exception in thread "main" java.lang.NullPointerException
at utility.ExcelUtils.getCellData(ExcelUtils.java:33)
at ExecutionEngine.DriverScript.main(DriverScript.java:65)