Forum Discussion
1 Reply
Sort By
- 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
- 7 years agoasn_007
- 2 years agoaims
- 11 years agoosamazboun
Recent Discussions
- 23 hours agoruchisingh