Skip to main content

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.

  1. In the Adapter Design window, in the Targets frame, click a control. The selected control is highlighted in the frame.
  2. 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.
  3. 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.
    c14p2e1 02a
  4. Make any necessary adjustments to the rules.
  5. Click Refresh to accept the manual changes.
    refresh changes

Removing a match rule

Follow these steps to remove a match rule.

  1. From the Match Rule frame, highlight the match rule you want to delete.
  2. 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.
match rule editor

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.

c14p2e1 04

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.

  1. In the Object Hierarchy, highlight the control using ElementID match rule.
  2. In the Properties window, locate the UseElementID property.
  3. Change the UseElementID property to False.
    UseElementId property
  4. In the Adapter Design window, in the Targets frame, select the correct control to modify match rules.
  5. In the Match Rules frame, right-click and delete the Element ID Match Rule.
  6. In the Interrogation Form, change the combo box from Default to Debug Matching.
    debug match
  7. From the Taskbar, bring the browser back to focus.
  8. 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:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice