Check if UiElement contains something or not - need Boolean value for IF Condition

Hello there,

im curious how i can check if a ui element contains something or not.

I have (on a Plattform) a search engine for suppliers.
there 2 cases:
1.) i find a supplier → then i click the supplier with “click activity” (works fine)
2.) i dont find a supplier → then it shows me nothing, like this (attached picture do below)

So i need case 2 to solve.

If it doesent find anything, then it should return to beginning and take another suppliername to search for.

i tried this:
1.) text exists activity → gives me boolean value. It trys to get the message whene nothing pops up… not working.

2.) Element Exists: → gives boolean, but still not working because it sees kinda the uielement itself, but not that it is empty.

3.Get text: → should get the text i want, then i check in the IF myvar.contains(“message”) = true – not working

Has anybody an idea of how to solve this problem.

Thanks to everybody who supports:)

you can look for the text “Die Tabelle enthalt keine Eintrage”.

if exists, then proceed to the next supplier.

You can use find text activity.

1 Like

i just have: “find text position” or “text exists” activity.

do i need a other package?

thanks for fast reply

The same one.

OR

Regards,
Karthik Byggari

Last question:

For Find Text Position. How do i check it in the Flow Decision activity if it contains the text
like this?–> uielement.contains(“message”)=true does it work

and for Text Exists:
like this?–> boolvar = true (boolvar is the output of text exists activity)

I tried both, but it is not working.

Can it be that the acitivity is not finding the text thats why it never returns true?

Is there a workaround?

Hi @blend
Fine we can use data scrapping option from design menu buddy
–data scrape the whole table and get the output as a variable of type datatable named ExtractedDatatable
–use a if condition like this
ExtractedDatatable.Rows.Count>0
if this condition gets passed it means there is record in it and will go to the THEN part of if condition where you can go ahead with your activities you want
or
it will go to the ELSE part of if condition where you can leave it blank or include any activity if no data is found
Kindly try this and let know buddy
Cheers @blend

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