06-04-2013, 12:51 PM
My Requirement: When i click on a button in a dialog box, a window should come where as i need to click on OK button. Below is the code
**********************************
'**********************
In the above code, when I click on "<<" button, QTP gets hanged. If I handle that error window manually, the issue not happening.
Please advise how to handle this
**********************************
Code:
JavaWindow("My Teamcenter - Teamcenter").JavaWindow("My Teamcenter_Newdesign").JavaDialog("Remote Export Options").JavaTab("JTabbedPane").Select "Advanced"
JavaWindow("My Teamcenter - Teamcenter").JavaWindow("My Teamcenter_Newdesign").JavaDialog("Remote Export Options").Activate
JavaWindow("My Teamcenter - Teamcenter").JavaWindow("My Teamcenter_Newdesign").JavaDialog("Remote Export Options").JavaButton("<<").click
' For loop to handle the window which occurs multiple times
Set objUnableWdw = JavaWindow("My Teamcenter - Teamcenter").JavaWindow("Shell").JavaWindow("Unable To Include Relation")
For i=0 to 10
If objUnableWdw.Exist(2) Then
objUnableWdw.Activate
objUnableWdw.JavaButton("OK").Click
else
Exit For
End If
'**********************
In the above code, when I click on "<<" button, QTP gets hanged. If I handle that error window manually, the issue not happening.
Please advise how to handle this