How to use Condition with image exists

Hello… I need help… I want to make a flowchart with one validation…
In one webpage appers a image … I need get this image and make a “if”…
if this image exists my robot need continue to next step, if not exist I need make login!
But I don’t know how get the “div” for exemple in this image… and how use how condiction in activite “if”…

Hey @Grazielle_Lemos,

Is this what you’re looking for?

Yes, but how I use the image in “if” and how I get the “div name”…?

Hi @Grazielle_Lemos,

To use an image exists and an if statement, you would create a variable in the properties pane of the image exists, which is a Boolean type:

Then in the If statement, specify the variable you have just made, as shown in the screenshot on my previous reply.

If you are trying to use the indicated image elsewhere, I suggest using a Take Screenshot activity, which will generate a useable image.

I am not sure what you mean by getting the DIV name, this is an attribute of a selector. You could use a Get attribute, indicate the element you want the div name of, and then specify “div name” (or something along these lines, I have not done this attribute before) in the activity, like so:

I try specify a variable, but how I use this for condition… ?


Vou tentar explicar no meu idioma nativo…

Eu usei o “image exits” para reconhecer a imagem… Onde diz “Output Found” coloquei a variável… no “if” eu precisava colocar dentro da condição algo como “se a variável existir” e ai as ações para caso ela exista ou não!

Minha primeira ideia era usar o find image ou o image exists, mas não estou conseguindo usar eles da forma correta.

Hi @Grazielle_Lemos,

I see you’re using C#. It should be the same as VB though. You can use a fllow decision in a flowchart and it works the same as an if statement. Enter the condition in the properties panel and then put message boxes on either side of the decision:

Consegui entender a sua lógica, mas ele apareceu este erro!

Hi ,
I have one client application, So there is Home,Delivery 1,Delivery 2,Delivery tab is there but I want to go on Home and Delivery tab and for every customer that tab is changing sometimes Home comes 1st sometimes Delivery tab comes 1st sometimes in mid sometimes in last and I want to know Delivery tab or Home tab are there or not if there so message show exist and if not there then add Home or delivery tab I used Image exist method ,but bot is getting confused between delivery 1,delivery 2 tab and all time it says True but my situation is if Delivery tab not there so bot need to say False and add ,So please suggest another method other then Image exist, and I used Hover,Text but for every condition bot is not working**,Delivery 1+Delivery+Work+Home** bot is not clicking into the Delivery tab and I want without touching other tab it need to go on Home and Delivery only ,

Delivery 2+Home+Delivery

it is also failed to execute,Home+Delivery 1+Delivery 2 in this situation I want that bot need to Add delivery tab and say False Delivery tab not exist and need to go on Home and Delivery tab only but failed I used in my code Image exist,IF condition ,Hover,Text ,click.
Please suggest something that make my bot robust for every situation. :slightly_smiling_face:
emphasized text

Siempre entrega un “true” como respuesta.