Text exist - eliminate whitespace importance

Hey,
I’m using Text Exist activity but message box showes false. I tried two ways as in screeshot. I don’t know if right one is even correct. Any idea how to get true value?

Hi!

please can you show me the selectors once.

and also have a view on this

Regards,
NaNi

1 Like

Hi @Michal_Podlasin

Check with the aaname or innertext attributes in Selector.

And use the string as it is in the aaname or inner text attributes!

Regards

1 Like

Here is my selector. DOGE is only for training purposes : D

Looks good for me. Still don’t know what’s wrong: /

Hi! uncheck the title and parent id!

i hope this will works for you.

if still your issue is not resolved. open it in UIExplorer and show me the screenshot.

Regards,
NaNi

1 Like

False again : /

Please help

I would like also to put value of variable instead od “DOGE” in Text Exist. Is it possible? If yes please tell me how. Maybe I should use MATCHES activity?

Open it in UiExplorer you can find this option on text exists activity. click on the 3 lines and you may see the option like open in UiExplorer

then take a snap and send it to me

Regards,
NaNi

1 Like

Here you are :grinning:

Uncheck css and tag. And also delete the variable and again create the new variable inside the text Exists!

Regards,
NaNi

1 Like

Is it possible to put string variable of value “DOGE” instead of “DOGE” in text exist? If yes how I can do this?

Actually text Exists takes the Boolean type. So this will give you the result as True or false.

If exists it will give you the true. Else false.

If you want that DOGE data. Use get text activity.

If you provide the string it won’t give you any result.

Regards,
NaNi

1 Like

Thanks ! Two more questions.

  1. From get text I’m receiving for example "DOGE " with whitespace. How to format this to “DOGE” without whitespace?
    2.How to use variable in RegEx in MATCHES activity?
  1. To remove white space from the string use variable.Trim.tostring

Have a view on this

2.RegEx is used to give you the pattern of a string. And If you wants to use regex to a string use below query

System.Text.RegularExpressions.Regex.Match(VariableName,“(pattern)”.Value.ToString

Regards,
NaNi

1 Like

Hi! @Michal_Podlasin,

i hope you get the answers. if solved please mark as solution.

please refer below!

Regards,
NaNi

Fine

May be i will mention a simple way to achieve this

  1. First use a GET ATTRIBUTE activity where indicate the element and get the attribute aaname and save it to a string variable named Strinput

  2. Now use a IF activity and mention the condition like this

Strinput.ToString.ToUpper.Contains(“DOGE”)

  1. If the value is true it will go to THEN block where use a MESSAGE BOX activity

Here if you see you got to hold the value of “DOGE” in a string variable and also it is getting validated with a IF condition

As simple as it is

Hope this would help you

Cheers @Michal_Podlasin

1 Like

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