BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

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

Open ttl15 opened this issue 3 years ago • 1 comments

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

ttl15 avatar Aug 08 '22 15:08 ttl15

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.

darby3 avatar Aug 22 '22 19:08 darby3

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.

flosell avatar Oct 09 '22 05:10 flosell