Hi,
I am trying to automate a .NET and VB based application.
Instead of wait(15) before a VB window appears
I am using a function
I put this function in Library file, However when I call this function it takes longer and does not recognize the VB window immediately but waits for whole 15-20 seconds before it proceeds . What is the solution in this case when I want to avoid wait statements.
I am trying to automate a .NET and VB based application.
Instead of wait(15) before a VB window appears
I am using a function
Code:
Public Function Stayfor(Stay_object)
waitfor = Stay_object.exist(2)
checktime=1
While Not waitfor
wait(1)
waitfor=Stay_object.Exist(5)
checktime=checktime+1
If checktime=15 then
waitfor=True
End if
Wend
End Function
I put this function in Library file, However when I call this function it takes longer and does not recognize the VB window immediately but waits for whole 15-20 seconds before it proceeds . What is the solution in this case when I want to avoid wait statements.