How to check an AutoIt Script passed or failed in selenium webdriver
The following code will run an AutoIt script i.e. CreateNew.exe Process p=Runtime.getRuntime().exec(“exeFiles\\CreateNew.exe”); p.waitFor(20, TimeUnit.SECONDS); Integer result = p.exitValue(); sa.assertEquals(0, result); Explanation: Run an AutoIt script i.e. CreateNew.exe Wait for 20 seconds for the AutoIt script to complete, if it doesn’t gets completed within 20 sec then the execution will move to next line.
Note : You can change this time as per your need. This line will check whether the AutoIt script is passed or failed. Will fail the TestNG script if AutoIt is script is failed.