Is Match in Retry scope returns true in error?

I’m trying to use a retry scope to select a radio button tat doesn’t always seem to click correctly. In my scope activity I have the click and a get attribute (returns the text of the radio button, which is either “checked” or “unchecked”).

With this I have an is match condition, checking the input variable test (the result of get attribute, stored as a string) against the pattern “checked”. This is returning true even though the log shows the value of test is actually “unchecked”.

In one case I am able to resolve this by using try/catch instead, as the next field doesn’t show if the button isn’t clicked, but with the other case I need to use retry (I did attempt this with element exists and specifying checked in the selector, but it doesn’t come up as valid).

If anything, I need this to help my understanding :slight_smile:

Not an answer that will help your understanding but I don’t use retry scope, instead I just use while with a try and catch which do the same

Hi @SoqedHozi,

Use dynamic selector,It will work.

What is a dynamic selector? Where are you expecting me to use this, as it is not part of is match obviously.

my original click command works. the attribute checked/unchecked is not part of the selector.

I’ve found a solution for my usage, even though my is match knowledge still lacks.

The button does work, but it was being deselected. To solve this, I have used a get attribute and an if statement. I then have a try/catch in case it doesn’t work for the next step when the field appears. I still don’t have an effective error handle for the other case (element doesn’t exist and a throw?)

Instead of using attribute and click activity you can try with check activity which will check the radio button if unchecked and leave it as it is if it is checked.

let us know if this helps.
Pavan H

That’s interesting, wasn’t aware that activity existed. I’ll give it a go.

1 Like

Hey @SoqedHozi,

If you got the solution please mark it, it will help others in solving their issue related to this.

Pavan H


I never did solve this particular issue.

Tom Copeland​

Business Operations Analyst