Forum Discussion
- avidCoderSuper Contributor
You can handle this using File in java. Go through this code:-
//Use File Counter to increase file count and set it at testCase level:- fileCtr = Integer.parseInt(fileCtr) + 1 testRunner.testCase.setPropertyValue("fileCtr",String.valueOf(fileCtr)) //It will read the file in String File resFolder = new File(path_of_folder_where_files_resides) File[] listOfFiles = resFolder.listFiles(); File fOut = listOfFiles[Integer.parseInt(fileCtr)]; String res = FileUtils.readFileToString(fOut) log.info res
Hope, it helps you out.
Related Content
- 8 years ago
- 12 years ago
- 3 years ago
Recent Discussions
- 4 days ago