Go to Robotic Automation version 22.1 documentation

Working with hidden forms

Use Window controls' UnmatchOnHidden property to set the matching status of application targets when they are hidden at runtime. This property usually applies when the interrogated application hides a Form rather than destroying it when the user closes the form. This property lets you have Studio unmatch the controls on the hidden form (or object). You can set this property for any Windows control.

When set to True, the control becomes unmatched when hidden. Any children controls of the control you set UnmatchOnHidden to True will also be unmatched when the parent control is hidden. For example, if you set UnmatchOnHidden to True for a form, all controls on that form will also be unmatched when the form is hidden.

The UnmatchOnHidden property will apply when either the application hides the control or when Studio hides the control (by executing the Hide method). If the UnmatchOnHidden property is set to True for a control and you call the Hide method for the control, the control will be hidden and unmatched. Once the control is hidden, you will not be able to execute the Show method for the control since it is no longer matched and Studio  cannot interact with it. This applies for any Studio interaction with a hidden control where the UnmatchOnHidden property is True and the control is hidden. Attempting to interact with the control will raise an automation error stating that the control is not matched.

If you set UnmatchOnHidden to True for a control, the only way for the hidden control to be shown and matched is when  application itself shows the control. The Rematch or RematchChildren methods will not rematch hidden unmatched controls. If the application shows the hidden unmatched controls, Studio will automatically rematch them. It is not necessary to call the Rematch or RematchChildren method in this case.

This property does not apply when you have set the adapter property HideApplicationAtRuntime to True. For example, if you set the HideApplicationAtRuntime to True and set UnmatchOnHidden to True for any controls in the application, the controls remains matched. You can show the application by calling the Show method on the application adapter.

 


Privacy | Trademarks | Terms of Use | Feedback

Updated: 01 July 2024

© 2016 - 2024 Pegasystems Inc.  Cambridge, MA All rights reserved.

 

OpenSpan data classification label