IF statment and Find element

Hi,

I Need som help with a if statment. I want the program to look if the element exist click it if not write line “something went wrong”

Running into an issue with UiPath element cant convert to bolean value.

Did this with find image and that worked however its kinda slow.

HI @TOOKT

You can try this condition

FindElementVarible.IsVisible

Regards
Sudharsan

1 Like

Hi

Swap the Find element with ‘Element exists’.

Then create the output with ‘Ctrl + k’.
Name it ‘bool_ElementFound’

Then simply insert this into the condition of the ‘IF’ statement.

Then branch will be the ‘True’ branch.
Else will be the ‘False’ branch

Take a look at this post:

Cheers

Steve

1 Like

Or what you can do is just give the Seconds in Timeout properties

It will wait for 3 seconds

Regards
Sudharsan

1 Like

Hi,

In classic design - You can use the ‘element exists’ activity followed by an if condition.

In modern design- It’s cool that we have ‘check app state’ activity which is a combination of ‘element exists’ and ‘if’ condition.

Happy Automation!

1 Like

@TOOKT you should use check app state
if you dont see it enable modern activities
image
Then when indicating element select visibility = FULLY VISIBLE

then you can apply your logic like this
image

1 Like

Used the check app state which is sort of the same, sso it solvved the issue, thx for the help.

Thx for the suggestion this speed things up at bit. From 2min average to 1min.

This solved te issue, thx for the help.

1 Like

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