Wait for element to appear / retry

Hi!

I’m building an automation where the first step is to open a page, wait for it to load and then click on an element. The problem is it seems like it doesn’t wait for the element to appear or retry it. It just gives me an error within a few seconds (and sometimes it does work, seems like a 50/50 case). Even though the timeout is set to default (30 secs). The page doesn’t take more than 10 seconds to load usually. I can set the ‘Delay before’ to 10-15 and it will always work, but I rather have a solution that just waits for the element and retries if it didn’t load yet.

I also set a verifiy exection on the next page with ‘Retry’ set to true, but it doesn’t retry it. I just get an error within seconds.
image

How do I fix this?

Thanks in advance!

Hi @Youri98

You could use a Check App State Activity

1 Like

Hey @Youri98 you go use Check app state actvitiy and surround it with retry to handle this type of exception like check app state usually check for the element on that basis it move forward while Retry give you the number of retry you want to perform and also you can ADD delay also on it
and if you are on classic activity use Element Exists activity and surround it with retry activity.

cheers

1 Like

@Youri98,

What’s the error you get?

That the UI-element doesn’t exist, but it doesn’t wait for it to appear. If it didn’t load yet → ofcourse it doesn’t exist :smiley:

I thought with my settings it would wait for it to appear. Especially with the default 30 seconds time-out. But it gives an error within 10 seconds.

@V_Roboto_V @singh_sumit

Thanks! I’ll try this later today and let you know if it works.

1 Like

@Youri98,

Check if the default settings are updated due to some policy or manually at Project level

Open Project settings and check this.

Yes, these are at 30 seconds.

1 Like

@singh_sumit @V_Roboto_V
Thanks, the check app state activity does work :slight_smile:

2 Likes

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