Open
Description
One thing that I've noticed is the possibility of disagreement between the visibility checking of Playwright and Testing Library.
For example, what if internally we are executing locator.waitFor({ state: 'attached' })
but are also querying using options.hidden === false
with Testing Library. The latter programmatically ensures that elements are not picked up due to "host language semantics specifying that the element is not displayed, such as CSS display: none
, visibility: hidden
, or the HTML hidden
attribute".
I don't know a fix for this unless we automatically force options.hidden === true
in these cases and haven't thought through the consequences of doing this.