How to approach the problem of same caption to parent and child window
Currently we are working on Rational robot automation and we are facing the following problem while executing.
1.In the application,Both parent window and child window is having same caption.
'Selecting the Status to Won
Window SetContext, "Caption= ABC - " & IETitle, "" ' Parent Window
ComboBox Click, "Name=select_0", ""
ComboListBox Click, "Name=select_0", "Text=Won"
SQALogMessage sqaPass, "Step3, Changing the Status to Won Passed",""
PushButton Click, "Name=Submit23"
Window SetContext, "Caption=" & IETitle, ""
PushButton Click, "Text=OK"
Window SetContext, "Caption=ABC - " & IETitle, "" ' Parent Window
HTMLLink Click, "HTMLId=feedback_0", ""
SQALogMessage sqaPass, "Step5, Clicking on Feedback Link Passed",""
Window SetContext, "Caption=ABC - " & IETitle, "" ' Child Window
Browser NewPage,"HTMLTitle=ABC","" ' Error is thrown here.
2.While running the script, child window is getting automatically minimized and focus is on Parent Window...
Rational is trying to perform the action of Child Window on the Parent Window and resulting - Unexpected Window error and Fail
Client is not willing to change the captions of the windows and in respective windows's properties, there is no index or level difference.
Can you please come up with any solution for handing this issue without changing the window caption ASAP.
Note: for security purpose, we have put the caption as ABC.
Re: How to approach the problem of same caption to parent and child window
Did you try to specify in recMethod that it is child window "ChildWindow" ?
For more info look at help for command "Window".
In your case it should be:
Window SetContext, "Caption=ABC - " & IETitle+";ChildWindow", ""
If you want to give somebody a fish, you'll do better if you teach him how to catch it.