top of page

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:

  1. Run an AutoIt script i.e. CreateNew.exe

  2. 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.

  3. This line will check whether the AutoIt script is passed or failed.

  4. Will fail the TestNG script if AutoIt is script is failed.

14 views0 comments

Recent Posts

See All

POM Concept

While writing a page object method which of the following "method signature" you think is/are correct & Why? public String getScreenDataAndGoToNextScreen() public boolean login(String username, String

Comments


bottom of page