garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.69k stars 604 forks source link

bugfix(playwright): timeout for elements without height #1399

Closed fuhlig closed 2 years ago

fuhlig commented 2 years ago

If selectors targets elements without height (e.g. child elements with position: absolute|fixed|sticky), it times out when using Playwright as the Engine.

Extend global page.waitForSelector for readySelector with state: 'attached' which should ensure that the element is in DOM.

Puppeteer does not have this issue and does not allow this option in waitForSelector (Puppeteer Docs)

Playwright Docs

fuhlig commented 2 years ago

state is not safe. Needs different handling for opting to fullPage screenshot when element has no height.