UI testing with puppeteer

Hi,
I am writing UI tests for my Theia extension and I encountered a problem identifying that my UI element is loaded or visible.
My test waits for xpath to be loaded but actually, we don’t know if the UI element is visible/enabled once this xpath is reachable. Is there any property I can check to know for sure that the UI element is visible

[original thread by Limor Erez]

Have you tried https://stackoverflow.com/a/21696585/5988613?

Which element do you try to test for visibility by the way? We are working on exposing theia APIs for testing, wonder whether it would help in your case.