I want to wait and unless is .

Right Now whats happening is When I run TestNG.xml file it runs all the @Test Priority wise and within 5 sec TestNg output Console Shows all the @Test are Passed.
While my AutoIT scripts are still running parallely in background.

The Code is as Follows:

@Test (priority=1)
public void CreateNew() throws Exception
{       
    Runtime.getRuntime().exec("exeFiles\CreateNew.exe");       
}

@Test (priority=2)
public void OpenaFile() throws Exception
{
        Runtime.getRuntime().exec("exeFiles\OpenaFile.exe");
}

And the Code of AutoIt file is as Follows:

createnew()

Func createnew()
    Sleep(2000)
    Run("Mspaint.exe")
    WinWaitActive("Untitled - Paint")
    Send("!f")
    Sleep(1000)
    Send("n")
    Sleep(2000)
    WinClose("Untitled - Paint")
EndFunc   ;==>createnew



Source link https://sqa.stackexchange.com/questions/20739/how-to--your-script-in-selenium-untill-your-autoit-script-gets-completed

LEAVE A REPLY

Please enter your comment!
Please enter your name here