Easy way to handle 'Click element if it exists'?

I often find myself adding Element exists > If (element existed) > Click element : Otherwise do nothing.

Is there a easier way to do this without using all three activities?

What if I use only a Click activity and set ContinueOnError=True, would that cause any issues in logs etc?

@vincera,

Yes, It will cause error. For suppose one pop up came and you want to click ‘OK’ then only it will allow to do some other task. In this case, if you set ContinueOnError=True then it will go to next step all try to execute next activity but system won’t allow until and unless you click Ok.

@vincera,

If you want you can use On Element Appear activity also.

You can put your click activity into a try catch, then it will continue if the element exists and you can do another sequence into the catch.

That’s a bit easier, thanks!

1 Like