Pega Robot Studio Universal Web adapter will create a control for the div id “Top Level” but I can’t seem to get any valid controls for the child elements under that. I need to be able to click on the “link three” text.
I have been trying to find the correct match rule scrolling through the controls Web Controls > List Web Controls method in the adapter with no luck. I have also tried creating both custom Property Match and Attribute Match rules also with no luck.
As a word of explanation as well, all the a tags have dynamic id values so id will not be useful for creating a reliable match. I was hoping to match on innerText or some other more reliable element.
Is there some advanced training on creating custom match rules in Pega RPA that I could make use of?
@AaronF99 Have you tried using Select Element to interrogate the specific control(s) you need? The standard bullseye is tricky to get to nested controls, so Select Element should work here. In addition, you can use the Web Controls tab in the adapter to add controls manually.
I am not sure what you mean by creating a custom match rule. The match rules are based off of properties of a control. There are two match rules available for UWA controls; Attribute match rules and property match rules. The former refer to attributes within the HTML (id for example). The latter refers to properties of a control (text, size, location, etc…).
If the IDs are variable, then you would use a different match rule(s) or customize the ID match rule to use RegEx to match it.
Thank you for the response. I guess what I meant by custom match rule is to write a match rule without using the all the parent elements. My understanding of how Pega match rules is that the drill down through the entire DOM to find a control from the top but is it possible to just find something like an a tag with innerText = “link three”? Would I be able to use RegEx for that purpose? I am not that familiar with RegEx.
I have tried select element as well and web controls as well with no luck so far. Will keep working on it.
@AaronF99 You are somewhat correct. Match rules apply to a control within a given hierarchy, however with few exceptions, controls are generally underneath the page control (unless you specify a different container). Once you interrogate a control, you don’t need to use its path as part of matching and the only requirement to match it is that its parent (the page usually) is matched as well. You can certainly use a generic text match rule for a given control and it would apply no matter where in the page it occurred.
RegEx is simply a means in programming where you can match text using an expression. For example, a phone number might be found using a RegEx like;
\d{3}-\d{3}-\d{4}
This is three digits followed by a dash followed by three digits followed by a dash followed by four digits followed by a dash. You can use your favorite search engine to learn more about them in greater detail, but that is really how they work. Your part is really identifying the pattern you want to search for.
You might consider opening a support request as they might be able to offer you some guidance on interrogation.