Help! Image exist and timeouts

I am creating a process, where it reaches a certain point that it needs to analyze a situation being differentiated by two images.
If he identifies the image “!” He gives ok and continues the process, if he does not identify the image “!” He clicks no and then ok.
However, I am realizing that he waits for the “ERROR” time when identifying the image “!” And then doing the “false” process I would like to know how I do it so that as soon as he identifies this image step, he immediately performs the steps .
I managed to make it work in a “slow” way because it waits the necessary time to move to the “false” step … I wanted to make it more optimized so that as soon as it does not identify the defined process it will already do the other process .
How do I do that?

This condition that I used in the IF was a test, what I really use is just the variable, where it identifies it and goes on to then

is there any reason that image exists is used. What about using a selector to the element?

It can’t identify that something is not there. It is waiting to see if that thing loads. That’s the point to the timeout. Just make the timeout shorter.

Also, the condition of your If isn’t correct. You don’t have to use “= True” and “= False” - boolean variables already provide true vs false. Just do…

GERAD_SUCESSO OR (NOT GERADO_ERRO)

Hello Postwick, how are you?

Thanks for the information, it was like I said above, this condition was a test in order to try to get it right in trial and error.

The problem of decreasing the time is the issue in some processes the time is different for each specific moment, in one process the waiting time can be 10s in another 3m, I was wondering how I can set a standard time for him to move on without having to always wait for 3m

Not sure what you mean by “in some processes the time is different.” You can just set the timeout differently for different processes. There’s no way to get around the “if it exists it finds it immediately, if it doesn’t exist you have to wait for the timeout to expire” aspect of this activity.

Is there another way to accomplish your goal? Is there an element you can check for that would represent your false path? In other words, two short timeout element exists activities - one that checks for the thing that says “it worked” and one that checks for the thing that says “it didn’t work.” One of them will process instantly since “it worked” and “it didn’t work” are the only two possibilities.

I am performing an automation that has the functionality of generating files in several companies within a system. The time varies according to the demand of each month and the information flow is variable from company to company

I managed to make it work the way you mentioned earlier, about defining an “x” time where it covers the longest process, but it will consider that time for all companies.
So far so good, but I wanted to try to optimize the process and make it consider the correct execution time for each company, instead of a default value.

Ex>
Company 1> 30s
Company 2> 1m

The time on that occasion would be 1m where it would cover both companies. It would only take 30s longer to wait for the company 1

But a scenario where there are hundreds of companies, with time ranging from 10s to 10m at the end of the process, is a lot of time wasted.

This activity that you mentioned about considering a process as true and another as false would be the images that are different in the process. (“?”) would be “FALSE”.
Is there a way to consider this as a condition? Or the dialog box (pop up)

These are the two occasions of the dialog boxs

image
image

Use UI Explorer to get the selector for both boxes and post them here. If we can find one selector that would apply to both popup boxes, then you could do a Get Attribute to get the title of the popup. Then it would happen the instant the popup appears.

I am a beginner in this “RPA world”, I will try to get the information you said, I think that is what you meant.
If not, please give me an example of where I can get the information you wanted to say.
I am not in the habit of using the UI Selector, even though I know that it is an important tool. I get scared by so much information and I don’t know how to use it correctly

By the way thank you very much for trying to help me, I don’t even know how to thank you

Ok that works out really well. Both have a common selector with the app name and cls. This will detect both windows:

<wnd app='sagrefis.exe' cls='#32770' />

So here’s what you do. Instead of Image Exists, Element Exists, etc, use the Get Attribute activity.

image

image

The result will be that the variable titleValue will be either “CONFIRMA” or “INFORMACAO” - you can use that in your If condition, or even a Switch activity, to determine which popup appeared. So you can set the Get Attribute timeout to the longest it needs to be for the longest company, but it will still execute the instant the popup appears.

I do not believe!
Thank you very much POSTWICK, you undoubtedly helped me a lot, I hope one day I will be able to return this to you to someone who needs it.
I’m sorry for the delay to answer you, I ended up leaving work and went to college.
I will test this activity today and return to let you know if it worked.

Let me see if I understand it, I can use it well, I’ll use this attribute where the image exists, and formulate the condition in the if for each case, when the “pop-up” with the title appears, it will execute the IF, but how would I elaborate the correct if? Could you give me a brief example if possible?

Get rid of the Image Exists. You only need the Get Attribute.

You will end up with a string (the output variable set in the Get Attribute properties). Use that in an if…

image

You could also use it in a Switch…

image

If you use a Switch just make sure to set TypeArgument to String.

image

Okay, I’m going to start testing now.
I believe it will be all right, and really thank you very much saved me a lot of time the help and knowledge you gave me

I just realized that in my comment starting with “Ok that works out really well” the code I typed was hidden. The selector for the Get Attribute should be…

<wnd app='sagrefis.exe' cls='#32770' />

This should identify the popup no matter which one it is. Then the Get Attribute with “title” tells you which popup opened.

Do I just copy and paste this code that you mentioned in the selector box?

How can I replicate this code to another box?

I’m trying to copy, but it accuses error

it worked out

Just to confirm, would the type of variable for titleVALUE be correct String?

Yes, Get Attribute returns a string. There is a trick to always creating the correct datatype. In the Properties panel for Get Attribute, click into the Result box. Press CTRL+K on your keyboard and type a name for the variable. This automatically creates a variable with the correct datatype for what the activity returns. You can do the same for other properties and other activities.

Just make sure you pay attention to the scope of the variable it creates. It will create it with the most limited scope, so you may need to adjust the scope if you need the variable available elsewhere.

I did a test in some companies and it worked, I will put the final test to run.
I am literally speechless, it will help me a lot.

On the get attribute, you used

I will have a similar situation to adjust in another process of mine, as I can extract the correct information to apply this function of the attribute

You’re very welcome. Please mark my comment as the solution.

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