How to find a Text in an Element

Hello together,

i am trying to find a text in an Element. When the text is available. he should proceed with Step A, if not he should close the application. Problem is, no matter how i set the boolean (false or true) he is always just going one way. i tried it with Image exists, Text exists and Element exist. Nothing is working. _The Element which is beeing indicated to the screen, is just a marked part of an bigger Element. UIPATH is not able to find this text as own element.

hope you can help

Regards

1 Like

Hi @Berto

are you sure it is text isnt it a picture? otherwise try screenscraping or get text!

Cheers!

@Berto

Use Get Text activity and indicate that text and will give you output as string.

And then check string length is greater than zero or not. If it is greater than zero then text exists and continue what you want to do next else close it.

THanks for your reply.

@Iakshman, this does not work, because the text is not a single element, its involved in a whole tree which i can indicate.

Unbenannt

so any further suggestions how i can handle this?

Thanks and Regards
Roberto

Fine
The sequence would be like this
—use FIND TEXT POSITION activity And mention the text we want to search as a string and also by choosing that text appearing space as a element with selector
—then get the output from the above activity with a variable of type uielement
—now use ELEMENT EXISTS activity and pass the above uielement as input and get the output with a variable of type Boolean
—now Pass the same Boolean variable as you have now in IF condition
And with same THEN and ELSE part

Cheers @Berto

1 Like

HI Palaniyappan,

thanks for your reply, i think i am doing something wrong, please check the screenshot

I dont understand what to do with “And mention the text we want to search as a string and also by choosing that text appearing space as a element with selector”. maybe thats why it does not work? can you please give me a further hint?

Thank you and Regards
Berto

try var_boolean_WFExist == true
or just leave the variable as condition

Use can use get attribute activity and then pass “text”.