Skip to content

Commit 9a6de23

Browse files
author
poncoe
committed
can set path anywhere
1 parent 14fc4f1 commit 9a6de23

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/com/coedotzmagic/qatools/util/DataDrivenWithExcel.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ public class DataDrivenWithExcel {
3131
*/
3232
public static List<Map<String, String>> readTestDataFromExcel(String filePath, String sheetName) {
3333
try {
34-
String pathFolderTestdata = System.getProperty(USER_DIR) + File.separator + "DataDriven";
35-
new File(pathFolderTestdata).mkdirs();
36-
String getFilePath = pathFolderTestdata + File.separator + filePath;
37-
38-
FileInputStream fis = new FileInputStream(getFilePath);
34+
FileInputStream fis = new FileInputStream(filePath);
3935
Workbook workbook = new XSSFWorkbook(fis);
4036
Sheet sheet = workbook.getSheet(sheetName);
4137

@@ -76,4 +72,4 @@ public static List<Map<String, String>> readTestDataFromExcel(String filePath, S
7672
}
7773
}
7874

79-
}
75+
}

0 commit comments

Comments
 (0)