How to ignore dynamic text in a string

Hello all, just started using UiPath not so long ago…. Hoping someone can help me with my question:

There is this pop up message some how some values change depends on data used.

For example - The text reads “You will be charged minimum $10 or 5% of the total amount, whichever is greater. Do you want to continue?”

In other case, “You will be charged minimum $10 or 4% of the total amount, whichever is greater. Do you want to continue?”

is there a better way to implement this?

if var1.Equals(“You will be charged minimum $10 or 5% of the total amount, whichever is greater. Do you want to continue?”) OR var1.Equals( “You will be charged minimum $10 or 4% of the total amount, whichever is greater. Do you want to continue?”)

Then
var2=true

Sorry if this is confusing…

Hello @joyda
Try Regex method

System.Text.RegularExpressions.Regex.IsMatch(YourString,"You will be charged minimum\s\$[0-9.,]+\sor\s[0-9.]+%\sof the total amount, whichever is greater. Do you want to continue\?")

Thanks so much for your reply…. I really appreciate it! I was able to make my test work.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.