What is the most effective way to handle the click on a UI Element that is not always available

In the academy, exception handling, there is a question:

What is the most effective way to handle the click on a UI Element that is not always available

And the answer is “Place the activity inside a try/catch”

I do not know why it is the most effective way? Maybe that allows you to log the error, but how else it is more effective.

Hi @ui_xpath

It would seem like you can then handle the exception by, for example, cleaning up or retrying your click based on some extra logic.

1 Like

thanks, @loginerror