Common match rule issues and resolution
While Pega Robot Studio provides an advanced matching system to identify control targets, the matching system can sometimes fail to provide a unique match for a control. Matching issues may arise due to changes in the application or a failure to identify a control during interrogation.
Resolution of a matching issue depends on the type of issue you experience, such as:
- Ambiguous matching
- Partial match rule failure
- Change in the application hierarchy
- Generic controls
Note: Match rules require adjustment only when X-ray Vision is disabled. If you experience matching issues in an X-ray Vision-enabled application, contact Pega Support.
A common match rule issue is ambiguous matching. Ambiguous matching occurs when the default match rules applied by Pega Robot Studio match more than one target. This failure usually occurs because the default match rules chosen apply to multiple targets within the application, and additional match rules are needed to provide a distinct match. If an ambiguous match occurs during interrogation, the Interrogation Form displays an error message. Ambiguous matching can cause automations to perform in an inconsistent way when the control is matched to an unintended target.
In addition, the Targets section of the application designer window displays more than one matched target as indicated by the Green Eye icon.
The best way to resolve a matching issue is to add a new match rule from the application designer window. Adding new match rules allows the system to provide a distinct match and eliminate the extra targets shown in the application designer window.
When you select a new rule from the Add rule list, the rule is added to the Match rules for the control. You click the new match rule and configure the matching rule in the properties grid.
Partial match rule failure
Partial match rule failure occurs when you have multiple match rules for a control. When a partial failure occurs, one or more, but not all, match rules fail and Pega Robot Studio cannot match the control. To resolve a partial match rule failure, use Debug Matching.
Debug Matching re-inspects an interrogated control and then highlights the current match rules that fail to identify the object. On the Match Rule tab of the application designer window, developers can begin inspecting the properties on the object to determine whether to edit the failing rule or to remove the match rule and add a new match rule on the object to resolve the matching issue.
Before using the Debug Matching option, developers must select the failing object in the Object Hierarchy list in the interrogation form, and then click and drag the Target icon to the selected target in the application. Doing so isolates the debug matching feature to the specified control for resolution.
Change in the application hierarchy
Sometimes, an application update changes the hierarchical structure of controls. When this happens, Pega Robot Studio cannot match the control and also cannot match any children of the control. Resolve this issue by using Replace Control.
Replace Control allows developers to completely replace the control in the project by automatically deleting the current match rules and replacing them with new interrogated match rules. Doing so automatically updates all automations that use the control and any control children, assuming the children have not changed.
Similarly to Debug Matching, select the object first in the Object Hierarchy before clicking and dragging the Target icon on the isolated target in the application.
Pega Robot Studio makes every attempt to identify each target. For example, when you interrogate a text box in a Windows application, Pega Robot Studio tries to identify the object as a text box with all its inherent properties, methods, and events so that you can use the object fully in automations. However, in some cases, Pega Robot Studio can define the targets as only a base Windows control, which is referred to as a generic control.
Generic controls have a base set of properties, methods, and events that are often a subset of the full functionality available within the application. Without the full set of properties, methods, and events, you may not be able to perform the necessary actions in your automation.
If a control is interrogated as a generic control, Pega Robot Studio cannot see the control as a specific supported type. The control might need to have a translator written for it.
Check your knowledge with the following interaction.