Modifying match rules
Modifying match rules
Due to the dynamic nature of web applications, rules can fail or change without notice, which creates more opportunities to modify and update match rules. However, the process and logic in editing and changing match rules applies for both Windows and web applications. Before any match rule modification occurs, you must run the interrogation process.
When modifying match rules, the first steps to consider are adding and removing match rules.
Adding match rules
Follow these steps to add a match rule.
- In the Adapter Design window, in the Targets frame, click a control. The selected control is highlighted in the frame.
- In the Match Rules frame, select a new match rule from the combo box. Only the match rules available for the object type display in the combo box.
- In the lower-right corner, click New to add the new match rule to the Match Rules frame. You can use a match rule once per object. Once added, Pega Robot Studio™ removes the rule from the combo box list. If the rule requires manual input, the green check marks change into orange question marks.
- Make any necessary adjustments to the rules.
- Click Refresh to accept the manual changes.
Removing a match rule
Follow these steps to remove a match rule.
- From the Match Rule frame, highlight the match rule you want to delete.
- Right-click on the match rule and select Delete.
Using the Match Rule Editor
Often, Pega Robot Studio uses match rules that validate against any text associated with the object. Windows forms and web pages may contain text that changes with each user or each account accessed. This dynamic text causes issues because the match rule considers the text static or persistent text. You must modify text-based match rules to eliminate dynamic text and evaluate the object solely on the static text. Pega Robot Studio provides a Match Rule Editor window to perform this task.
The Match Rule Editor consists of the following options:
Property | Description |
---|---|
Text | The label text of a target object, such as the window title bar text or a control button label. For the sample CRM.exe application, the Login window text is Login. Modify the text to support the Mode selection. |
Culture | Language (culture) used by target application users. The default is User Culture, which uses the operating system setting (see region and language options under Control Panel). |
IgnoreCase | The default is True, which indicates that text can appear in either upper or lowercase. |
Mode | The default is Simple, which means the text must match literally. Available mode types include Regex, StartsWith, and EndsWith. Regex mode indicates that the Text property contains Regex syntax. Select the mode in conjunction with the Text property value. |
If the match rule requires manual text edit, an ellipses button is displayed in the Selected Match Rule frame that allows access to the editor for rule parameter modifications.
Removing the Element ID Match Rule search
With web applications, the Element ID match rule may make objects unmatchable. Pega Robot Studio presents a message to you if it believes the Element ID match rule is the problem. Use the Debug Matching option on the Interrogation Form to complete the process.
Follow these steps to remove Element ID match rule from the control.
- In the Object Hierarchy, highlight the control using ElementID match rule.
- In the Properties window, locate the UseElementID property.
- Change the UseElementID property to False.
- In the Adapter Design window, in the Targets frame, select the correct control to modify match rules.
- In the Match Rules frame, right-click and delete the Element ID Match Rule.
- In the Interrogation Form, change the combo box from Default to Debug Matching.
- From the Taskbar, bring the browser back to focus.
- Interrogate the same object selected in the Object Hierarchy. Pega Robotic Automation Studio now ignores the Element ID rule and searches for other match rules to match the control.
This Topic is available in the following Module:
- Match rules v1
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?