Element Exist or Find Element?

Hi Everyone,

Can somebody please help me to find the best solution to make the UiBot to wait until element found on the screen.

The current process I am working on the Chrome Browser is loading very slow approx 5 min (Sometimes it is not even minute) to load after I click on searching. is it possible to make the bot wait with out using Delay activity and needs to perform click activity once its found the element.

Much appreciated for your Kind help.

Regards
Vishnu

1 Like

Delay is an alternate solution, it could work.

However you can use On Element Appear

or On Image Appear activity also

Thanks,
Prankur

5 Likes

Thank you for your quick reply joshi.

So While I am using On Element Appear activity the bot will wait until the element exist right? No need to use the Delay particularly?

Is my understanding is correct?

Regards
Vishnu

1 Like

yes

image

Try all properties you will get it better

image

Thanks,
Prankur

1 Like

Try the below logic

starttime = now()

elementFound = false
timeOut = false

do
{
if (element exists())
elementFound = true

if (elementFound == false)
{
endtime = now()
diff = starttime - endtime
if (diff > threshold)
timeOut = true
}
}
while(elementFound == false && timeOut == false)

Thank very much skini76

Thank you Joshi, I hope it will work let me try and Much appreciated for your time.

Regards
Vishnu

1 Like

Madison
Hi Joshi,
Can I use one more element appear activity within the existing one. It throwing an error as attached.

Set Repeat Forever property to false and try

Thanks,
Prankur

1 Like

Yes Joshi that is correct I have just worked on it. I am pretty perfect now on these activity.

Regards
Vishnu

1 Like

You could also try a Retry scope. In action you put Find element (make sure your selectors are good). In condition you put Element exist, where you put your variable from Find element in the Element exist property.

Tick on wait active or wait visible the property og Find element :slight_smile:

Retry scope has a default 3 retrys.

Good luck

1 Like

Thank you Bjorn. Very Useful

If the loading can end in different states (loaded, aborted, …) I normally go for pick branches. In one branch you set a delay activity in the others variations of findElement and an action.

1 Like

Hi Marcel Thank you very much for your reply. Would you please elaborate a bit more.

Regards
Vishnu

Forget about the counter in the screenshot. Here I wait for either ‘wait’ or ‘done’ button to appear. If both not show up in a certain time (12 seconds in the example) the PickBranch with delay is executed. Just make sure you configure the Timeout of the findElements appropriate (longer than delay)

Hello,

I’m curious between element exist, image exist and find element, which is the best accurate to detect a pop up window that sometime not appear on screen? Or is there other option?

Regards,
Aoyama

if you can find a good selector, find element would be better, if not, image exist is a good alternative.