Matching frame works correctly when automation begins but when a new frame is opened, matching is no more possible.
Steps :
-
frmSapEasy is the main frame, matching frmAttachment_Management is possible
-
frmFind is opened from frmSapEasy
-
frmFind is closed to returned to frmSapEasy and matching frmAttachment_Management is not possible any more
@JeanChristopheD17042937 One thing I have found with SAP is that it actually reuses the same windows for seemingly unrelated screens. You can look at the Window Handle and see that some of these windows are actually the same control as one you might have matched before. They may just have been hidden. In those cases, you can use the UnmatchOnHidden property which might detatch the control when it gets hidden. If that isn’t working, you might need to interrogate the new controls on that same window and have it serve dual-purpose. Let me know if this is what you are seeing.
@ThomasSasnett A window is open, focus set on it and working with it is possible. Two steps later the same window is activated, it appareas but no focus is possible, the window is not reachable, WAITFORCREATE returns FALSE.
Which value should be define for propertyu UNMATCHONHIDDEN ?
@JeanChristopheD17042937 I am not following your question. Unmatch on hidden would be used for the control that is being hidden that you want to unmatch when that hide occurs. It is likely at the form level where I would look to enable it.
In 19.1 during interrogation, look at the properties in the Selected Target section of the adapter. With SAP, take note of the window handle of some of these forms you are having problems with. I suspect the window handle is the same. You can also use the information here to see if controls are visible or not.