Thursday, August 6, 2015

Selenium Webdriver - Handle Batch file



How to create and Run a batch file:

In case of plain java project - Go to home directory and type the below command in txt file and save as "Run.Bat".

java -cp bin AdminConsole.Main_method 
java -cp

In case the testNG project - Go to project workspace and write the below command in txt file and save as .bat file.

java -cp target\classes;libs/* org.testng.TestNG testng.xml


Call multiple batch file from a single batch file - One by one - write below command in TXT file.


CALL D:\jboss-5.1.0.GA-jdk6\jboss-5.1.0.GA\bin\run.bat
CALL batch1.bat
CALL batch2.bat
CALL batch3.bat


If you want to run multiple batch file simultaniously then write command in below format in txt file.

start cmd /k CALL batch1.bat
start cmd /k CALL batch2.bat




No comments:

Post a Comment