Click Activity Doesn't Identify HTML Button Changes

I am wanting to minimize all tabs on a webpage to get the page to look like this -

So I am trying to use a click activity to close any random number of open tabs that the page loads with. A potential example page looks like this.

Currently I am using ImageFound activities, a while loop, and a click activity to do this with my code looking like this.

The image found and the click activity cannot tell the difference between the ‘+’ symbol and the ‘-’ symbol. When I inspect the html on the webpage, the + or - button is differentiated by “show” or “hide” but I cannot get that html to reflect in the UI Explorer.

Does anyone know a more reliable way to achieve the same goal?

You should use For Each UI Element. The selector should identify the difference between the + and - icons.