To Verify an Application launch
To Verify an application is visible or not , use following code:-
1) Create a Windows object
2) Get all applications opened on desktop
3) Compare your application name & check if application opens
4) Return True if application found.
Function VerifyApplicationlaunch(applicationname)
on error resume next
VerifyApplicationlaunch=False
While VerifyApplicationlaunch=False
'1) Create a Windows object
Set oDesc = Description.Create
oDesc( "micclass" ).Value = "Window"
'2) Get all applications opened on desktop
If Desktop.ChildObjects(oDesc).Count > 0 Then
Set x = Desktop.ChildObjects(oDesc)
For y = 0 to Desktop.ChildObjects(oDesc).Count - 2
'3) Compare your application name & check if application opens
windowname=x(y).GetROProperty("text")
If Right(windowname,Len(applicationname))= Trim(applicationname) Then
'4) Return True if application found.
VerifyApplicationlaunch=True
Exit for
End If
Next
End if
Wend
End Function