.Bat文件并不总是用Java Code和Eclipse执行?
似乎与执行.bat文件有些不一致。
@AfterSuite(alwaysRun = true)
public void executeBatFile() {
try{
System.out.println("Executing batch file...");
@SuppressWarnings("unused")
Process p = Runtime.getRuntime().exec(Paths.get(System.getProperty("user.dir") + "/..").toRealPath() + "\\copyPasteImgs.bat");
//p.waitFor();
}catch( IOException ex ){
System.out.println(ex.getMessage());
}
}