RE: Error in Data Driven Framework


I am working on Data Driven Framework example shown in Selenium WebDriver Tutorials in  website. When I run file, I am getting the following error:

Exception in thread “main” C:\Users\ABK\Desktop\Sama\Eclipse\OnlineStore\src\testData (Access is denied)

Appreciate if anyone could help me out with this error.

on November 4, 2014.
Add Comment
4 Answers

The above error is fixed. I am getting a different error. As I am a beginner in Java programming and Selenium, I have difficulty in understanding the errors. Appreciate if you could help me out.

Here is the following error message:

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject

at utility.ExcelUtils.setExcelFile(

at automationFramework.Apache_POI_TC.main(

Here is the code:

package automationFramework;
    import java.util.concurrent.TimeUnit;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.firefox.FirefoxDriver;
    import pageObjects.*;
    import utility.ExcelUtils;
    import utility.Constant;
    import appModules.SignIn_Action;
    public class Apache_POI_TC {
    public static void main(String[] args) throws Exception {
        ExcelUtils.setExcelFile(Constant.Path_TestData + Constant.File_TestData,"Sheet1");
        WebDriver driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        System.out.println("Login Successful, now its the time to Log Off Buddy");
        ExcelUtils.setCelldata("Pass", 1, 3);

package utility;
        import org.apache.poi.xssf.usermodel.XSSFCell;
        import org.apache.poi.xssf.usermodel.XSSFRow;
        import org.apache.poi.xssf.usermodel.XSSFSheet;
        import org.apache.poi.xssf.usermodel.XSSFWorkbook;
    public class ExcelUtils {
        private static XSSFSheet ExcelWSheet;
        private static XSSFWorkbook ExcelWBook;
        private static XSSFCell Cell;
        private static XSSFRow Row;
    public static void setExcelFile(String Path, String SheetName) throws Exception{
            FileInputStream ExcelFile = new FileInputStream(Path);
            ExcelWBook = new XSSFWorkbook(ExcelFile);
            ExcelWSheet = ExcelWBook.getSheet(SheetName);
        } catch(Exception e){
    public static String getCellData(int RowNum, int ColNum){
        Cell = ExcelWSheet.getRow(RowNum).getCell(ColNum);
        String CellData = Cell.getStringCellValue();
        return CellData;
    }catch(Exception e){
    public static void setCelldata(String Result, int RowNum, int ColNum) throws Exception{
            Row = ExcelWSheet.getRow(RowNum);
            Cell = Row.getCell(ColNum, Row.RETURN_BLANK_AS_NULL);
            if(Cell == null){
                Cell = Row.createCell(ColNum);
            FileOutputStream fileOut = new FileOutputStream(Constant.Path_TestData + Constant.File_TestData);
        }catch(Exception e){
Train Answered on November 4, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.