Uncheck a checkbox if it contains partial text

Hey everyone!!

I’m Brand new to UI Path and I’ve done some tutorials. My Issue is I’m trying to Uncheck a checkbox if it contains partial text. If it contains the full text it will uncheck it. I’m using Get attribute and searching for {If threshold is} but it will only work in an absolute like this {if threshold is $1000} but it won’t work if the $ amount is anything else. My next step is an If Statement that unchecks. I’ve tried using a wildcard but that’s not helping. Thoughts? Any help will be greatly appreciated. I’m excited to join this community!!

Hi,

Can you try to use regex as the following , for example.

System.Text.RegularExpressions.Regex.IsMatch(yourString,"if threshold is \$\d+")

image

Regards,

Should I insert that after the get attribute or should I replace both with the Regex?

HI,

Do you mean $25 on web page is dynamic and check the checkbox even if 25 is changed, isn’t it?
If so, it’s necessary to tuning Selector of GetAttribute activity.
For example, as the following in strict selector.

aaname = '*if threshold is $*'

Regards,

Thank you Yoichi, I think we’re getting close. I was getting errors so I replaced the Get Attribute with this. Then I added the check/uncheck under the if statement. I ran it and it didn’t work. Thoughts?

Hi,

i think it’s necessary to modify Selector string of GetAttribute as the following.

Note: please use strict selector

Regards,