首页 > 解决方案 > 数据驱动框架

问题描述

我在 Excel 中有 10 个测试用例,如果我为每个测试用例运行 Selenium,则应该上传一个文件并将结果写入同一个 Excel。有谁知道这是怎么做到的吗?我知道如何读取 Excel 文件,但对于一个测试用例,一个文件上传我不知道该怎么做。

File file =    new File(filePath+"\\"+fileName);
//Create an object of FileInputStream class to read excel file
FileInputStream inputStream = new FileInputStream(file);
Workbook guru99Workbook = null;
//Find the file extension by splitting file name in substring  and getting only extension name

String fileExtensionName = fileName.substring(fileName.indexOf("."));

标签: javascriptjavaselenium

解决方案


推荐阅读