HTML element : get whether it is visible

Hello there,

I have a workflow in which I want to click on a button, if it is shown. I have to use Internet Explorer to display a page and on that page there are 2 buttons (one to create an item, one to delete it). The two buttons are not shown concurrently, but one is hidden with “display: none” in inline css depending on whether the item already exists.

I want to only click on the button to create, if it is shown, but I have not been able to do it.

So I now try to check whether each button is visible

GetAttribute for visibility returns 1 for both buttons
GetAttribute for style returns an empty string

Highlight element with ContinueOnError set to false does not give any exception for either button
Right-clicking (to check beforehand) on the button with ContinueOnError set to false does not give any exception for either button. In that case, the right-click on the hidden button appears to act as a right-click on the web page.

Image exists returns true for both button.

You can get the direct HTML using get attribute with “InnerHtml”

It’s also empty !

I try to use IE through remote desktop, so maybe not everything is available.

Thanks anyway.

I found that I can use Get Text Position for part of the label of my buttons.

1 Like

Ahh yes it may be slightly different then if using remote Desktop.

Glad you found a solution (Y)