Forum Discussion

SlickRick's avatar
11 months ago

Best way to execute an action if a control is visible?

First sorry if this question was already asked but i have created a shared keyword test to try and perform an action only if a control is visible:

Initially in my condition i had only the Control.Visible check but was throwing an error since the control did not exist for that case.

This is when i added the Control.Exists first check.

What bothers me is that this check make my test much slower when the control in question is not available.


For example when this control does exist, it would take 10sec to execute my test. But if it is not available, my test would then take 20-25sec to perform the same thing.

Therefore i was wondering if i was doing the right way or if there was a better way that would speed up the check?




5 Replies