What if locator.waitFor({ state: 'attached' })
but options.hidden === false
in Testing Library?
#506
Labels
5.0
Issues with potential breaking changes to resolve before/in the 5.0 release
documentation
Improvements or additions to documentation
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 usingoptions.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 CSSdisplay: none
,visibility: hidden
, or the HTMLhidden
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.The text was updated successfully, but these errors were encountered: