It is mandatory, because the button is exposed only, if a item in a list is selected. So it has to check if the button is exposed and enabled, because it can be disabled too... :-(
[/ QUOTE ]
I think you misinterpret the meaning of exposed. Exposed means that object isn't covered by another window. Selecting item in a list doesn't guarantee that button will be exposed since other applcations could run at the same time and cover the button. What you really need to check is that button Exists(), IsVisible() and IsEnabled()
That should satisfy your QA-boss.
To successfully click the button you have to set the parent window active and then click:
yes, I know, the it means, that there is no other window hindig e.g. the Button I wan't to click. The window containing the button will be automatically set active, so I used this to find out if the button is exposed. So I wrote a loop checking if the parent window is active. If it is then the button should be clickable. This I check with Exists(), IsVisible() an IsEnabled() combined with error-handling. It works quite fine.