garris / BackstopJS

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

postInteractionWait not working when the targeting an element in a popup model opened via clickSelectors #1480

Open Rah1x opened 1 year ago

Rah1x commented 1 year ago

https://github.com/garris/BackstopJS/blob/629a8ab373614c13a938416c203cc37ddcd14769/capture/engine_scripts/puppet/clickAndHoverHelper.js#L30

This thing is not working well when the targeting an element in a popup model opened via clickSelectors (using Puppeteer engine).

Solution I used to fix my problem:

if (typeof postInteractionWait === 'string') {
    await page.waitForSelector(postInteractionWait);
} else {
    await page.waitForTimeout(postInteractionWait);
}