Code to run batch file in Webdriver


final Runtime rt = Runtime.getRuntime();
try {
Process p = rt.exec(“cmd /C C:\folder\project\mybat.bat”); 
} catch (final IOException e) {
throw new RuntimeException(“Failed to run bat file.”);
}
No comments :

No comments :

Post a Comment