src/main/java/framework/DataDrivenParser.java
/**
         *
         * @param dataSetName DataSet Name
         * @param keyName Key to check
         * @return value of data type
         */
@param dataSetName DataSet Name
@param keyName Key to check
@return value of data type
@param dataSetName DataSet Name @param keyName Key to check @return value of data type
public String checkDataTypeIsExcelOrGlobleInDataset(String dataSetName,List<String> keyName) {
        String type = null;
        JSONArray dataSetFileList=getDataSetFileList();
        commonMethods.verifyJsonArrayIsEmpty(dataSetFileList,"DataSet directory is empty.",log);
        for (Object dataSetFile : dataSetFileList) {
            JSONObject main = Utility.loadJsonFile(dataSetFile.toString());
            if(main.containsKey(dataSetName)){
                isJSONArray=false;
                if(main.get(dataSetName) instanceof JSONArray){
                    isJSONArray=true;
                }
                else if(main.get(dataSetName) instanceof JSONObject){
                    type=checkDataSetDataTypeWhenItHasJsonObject(main,dataSetName,keyName);
                }
                if(isJSONArray){
                    type=checkDataSetDataTypeWhenItHasJsonArray(main,dataSetName,keyName);
                }
            }
            if(type != null){
                break;
            }
        }
        if(type==null) {
            commonMethods.throwTesboException("'" + dataSetName + "' is not found in any Data Set file",log);
        }
        return type;
    }
public String checkDataTypeIsExcelOrGlobleInDataset ( String dataSetName , List < String > keyName ) { String type = null ; JSONArray dataSetFileList = getDataSetFileList ( ) ; commonMethods . verifyJsonArrayIsEmpty ( dataSetFileList , "DataSet directory is empty." , log ) ; for ( Object dataSetFile : dataSetFileList ) { JSONObject main = Utility . loadJsonFile ( dataSetFile . toString ( ) ) ; if ( main . containsKey ( dataSetName ) ) { isJSONArray = false ; if ( main . get ( dataSetName ) instanceof JSONArray ) { isJSONArray = true ; } else if ( main . get ( dataSetName ) instanceof JSONObject ) { type = checkDataSetDataTypeWhenItHasJsonObject ( main , dataSetName , keyName ) ; } if ( isJSONArray ) { type = checkDataSetDataTypeWhenItHasJsonArray ( main , dataSetName , keyName ) ; } } if ( type != null ) { break ; } } if ( type == null ) { commonMethods . throwTesboException ( "'" + dataSetName + "' is not found in any Data Set file" , log ) ; } return type ; }
@param dataSetName DataSet Name
 @param keyName Key to check
 @return value of data type
@param dataSetName DataSet Name @param keyName Key to check @return value of data type