Help, I need to validate when Uielement is visible

Hi, I have webElement that is not visible but is present in DOM, so I need validate with Activity If the element exist and visible so click in button, else nothing.

Why? because this element validate the active sesion, if element exist I should do click in “YEs close session” but this element always is present in DOM so when this popup is not visible anyway close session.

In some cases we have luck and can derive the state from the webe element properties (e.g. parts from class names). In other cases we cannot, as maybe the status / trigger is set on parent elements or different realized.

For such scenarios also have a look at the following activity helping us for working with the css property values (e.g. display)