Do While loop not working for Element Exists

I have an issue where I am waiting for either one or the other element to appear. It takes about three minutes for one of them to show up. I used a Do While loop to keep checking to see if one of them shows up. It seems like it will only find the top one listed and not the other. Why is this occurring?

you can do following:
set the timeout to some shorter time for the element exists

have a look on the pick/pick branch activity. Some users got good experience by using this for such a scenario

Should the timeout be set the same for both Element Exists? I had it set to 10 seconds for each one.

Do while is doing loop when condition is true. So in your case loop is continued if saveAs element is visible (exist) or noItemsSelected is not visible, is that correct?

If you want to wait for one of the element to appear (so before waiting both selectors are false, cause we wait to sth appear on screen) then do while condition should look like:

saveAs=False And noItemsSelected=False


not(saveAs or noItemsSelected)

in both option do while loop is continued, when none of them exist. If one or another would appear, loop would be finished.

In my case i prefer to use retry scope with condition is true cause i can give it specific amount of retries, so there is no danger of infinite loop

Thank you! The “AND” is what I was lacking. I am not sure why I chose “OR”, but the light bulb went off as soon as I read your reply. Very much appreciated!

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