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?
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.