"Element exists" activity in combination with "if" activity

Hello everyone, this is my first post.

I have a problem with putting the output of my “element exists” activity in an “if activity”. I want the robot to reply if an element is present or not on a particular screen. The problem I have right now is even if the element element cannot be found (because on other page e.g.), the robot returns that the element exists. Can anyone be of any help please?

This is how my workflow looks like right now (UiElement is the output of the “element exists” activity)

The output for Element Exists is a boolean - make sure you assigning that correctly.

Also check your selectors to check they are corret.

1 Like

Hi @wassimelm, welcome to our community

If you have a problem with the activity “Element Exists” do as @TimK has just told you

but what I understand from your question is that you have a problem with this activity giving you the element even if it’s not visible in the screen.

If this is the case then you need to know that “Element Exists” returns True even if the element is not visible in the foreground.

If you want to test if the element is visible then you need to use “Image Exists” activity

1 Like

Thank you for your answer. The robot returns “element exists” on the login page, eventhough the element is not visible. The element is only visible if logged in. Does that mean that this activity can see if the element exists even if not logged in? That seems a bit weird because I am doing the first assignment of the advanced training and in the walkthrough they picked the “element exists” activity.

This is what I get. As you can see, the element I am searching for, i.e. “Dashboard”, is not visible

Ok guys, thanks already. I solved it by finetuning the selector of my element.

4 Likes

Hi wassimelm,
I have a situation same you, the result always True even even if the element element cannot be found. How do you solve it? thanks

Please share your XAML file

Hi Wassimelm,

I am running into the same issue, can you elaborate more on the solution? Thanks