Question

Controls Sometimes Do Not Match And Other Times Do - How Can I Keep The Controls Working?

When I ran my automation, the system would stop working and give an error that controls were not matched. When I ran the Interrogation tool, I got matches on all the fields but in practice, it didn't match. When i ran the interrogation a second time, the fields were not matched there either so I deleted them and started over. I got a match on interrogating the first time and then would not get a match when I interrogated the second time. I then went ahead and interrogated the page and made two sets of the same fields. Now, on several runs, I will get a match on one or the other (the example shows a match but it alternates which one it matches on during interrogation). On some runs, it will get no match at all. If I interrogate only once, it only matches the first time I interrogate and never again.

Is there some way I can make interrogation produce matches that will remain matched during the actual automation runs?

Correct Answer
August 16, 2019 - 3:31am

I foud a way to fix all this. If the child component is not found, I now rematch and that seems to work every time. I also got the username/password problem resolved by adding the "onkeyup" event after the value is entered. Now it finds the fields and logs in every time. :)

Comments

Keep up to date on this post and subscribe to comments

Pega
August 15, 2019 - 12:00pm

Most of the time when you first interrogate a web control, the match rules will default to using the Element Id match rule. However, it is not uncommon for Element Ids to be applied dynamically to web elements each time the page loads. This can result in the behavior that you are experiencing. If this is the case, then you will need to modify or change your match rules so that your controls always match.  Your images do not contain the match rules you are currently using so I'm unable to determine if this is the case. It would be helpful to see the match rules for a match control and the matchrules for the control when it does not match. By the looks of it, the problem lies in the match rules for the form control.

August 16, 2019 - 2:03am

Thank you for your answer. I tried to update the match rules and despite trials there, I wasn't able to get it to work. However, I started over and matched the container down to the children instead of just the children and that seems to have helped. However, I have another problem which is that when the form is submitted by the automation, the CRM says that the Username/Password combination is not found. However, I click on the user name box and then the password box and click the login button manually and the values that Pega put in the username and password text fields are confirmed correct when the CRM logs me. Are you able to shed some light on why this may be? Perhaps I should make a new post... However, the matching seems to work consistently now that I matched starting at higher levels all the way down to the children. Thank you for your help. It's much appreciated.

August 16, 2019 - 3:31am

I foud a way to fix all this. If the child component is not found, I now rematch and that seems to work every time. I also got the username/password problem resolved by adding the "onkeyup" event after the value is entered. Now it finds the fields and logs in every time. :)