garris / BackstopJS

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

postInteractionWait does not work anymore on v6.1.1 (puppeteer) #1431

Closed ttl15 closed 1 year ago

ttl15 commented 1 year ago

Hello,

Looks like v6.1.1 update "puppeteer": "^14.2.1", to "puppeteer": "^15.4.0",

when postInteractionWait on backstop.json file is greater than 0 (ie 3000)

backstop will throw an error below

Puppeteer encountered an error while running scenario... TypeError: page.waitFor is not a function

steps to reproduce

use backstop v6.1.1 create a new project backstop init backstop reference

no errors so far

now change postInteractionWait in backstop.json file to something other than 0 (ie 3000) run backstop reference again

error msg

SCENARIO > BackstopJS Homepage
Puppeteer encountered an error while running scenario "BackstopJS Homepage"
TypeError: page.waitFor is not a function
Browser Console Log 0: JSHandle:BackstopTools have been installed.
SCENARIO > BackstopJS Homepage
Puppeteer encountered an error while running scenario "BackstopJS Homepage"
TypeError: page.waitFor is not a function
darby3 commented 1 year ago

FWIW rolling back to backstopjs 6.1.0 got me around this. Saw this in the log output:

waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.
flosell commented 1 year ago

For those running into the issue and finding this issue - there's now a PR to fix this (#1441) but you might need to fix this yourself if you have a puppet/clientAndHoverHelper.js generated by a previous version of backstop.

Have a look here for inspiration.