Add a Delay without using sleep / wait

Lets see a simple code snippet that will add some delay without using the native wait or sleep methods while coding using VBs/QTP/QC

Sub Delay( seconds )
    Dim wshShell
    Set wshShell = CreateObject( "WScript.Shell" )
    wshShell.Run "ping -n " & ( seconds + 1 ) & "", 0, True
    Set wshShell = Nothing
End Sub

Happy Coding!


Popular posts from this blog

Trim / Remove spaces in Xpath?

RPA - Blue Prism, OpenSpan, Automation Anywhere vs UIPath