BOT fails in OnElementAppear when WaitVisible is checked

Hello,

I have used OnElementAppear in one of my BOT workflow. It is looking for an button. Properties selected are RepeatForever as False, WaitActive checked and WaitVisible as checked. With this set up if i run, BOT fails in OnElementAppear activity with timeout exception. If i uncheck WaitVisible and run, it is working fine. And Element is visible on the desktop application all the time. Wondering what could be the reason for this failure. Please let me know if anyone has solution or reason figured out already.

Hi @Chaithra_Jain

Welcome to the community!

What i did once, is that i used a while loop, if the the element doesn’t exist yet add 10 sec and loop untel it finds it. Once found proceed for the rest of your code…

@Chaithra_Jain

For desktop apps you can try with get attributes and check multiple states of the button, like visible, active etc.,

Hope this helps

Thanks

Thanks @mz3bel, yes this is one more solution i thought of. I just wanted to know why my code is failing on WaitVisible check. Just wanted to know what ui element property it verifies.

-Chaithra

1 Like

Thanks @Srini84. yes it helped.

@Chaithra_Jain

Nice to hear that it worked.

Please mark my post as solution to close this thread

Happy Learning

Thanks