thanks for your answer. I'm not sure though this will help.
1) This does not help to ensure that hiding something really does its job. I want to assert that clicking a button hides something.
2) This will not work for people creating tests that are not close to coding. The idea behind recording tests is that Domain experts can create the tests. They are normally not people close to coding, so navigating through the DOM is not feasible.
It might be simply that this is not doable as I expected to be.
But thank you for your answer