现在我正在学习用 Java 编写数据驱动测试的教程。我的 IDE 是 IntelliJ 社区版,以下是我的代码
package utility;
import config.Constants;
import executionEngine.DriverScript;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class ExcelUtils {
private static XSSFSheet ExcelWSheet;
private static XSSFWorkbook ExcelWBook;
private static XSSFCell Cell;
private static XSSFRow Row;
//This method is to set the File path and to open the Excel File
//Pass Excel Path and Sheet Name as Arguments to this method
public static void setExcelFile(String Path) throws Exception { …Run Code Online (Sandbox Code Playgroud)