shelfio / chrome-aws-lambda-layer

58 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
MIT License
637 stars 45 forks source link

page.waitForTimeout #28

Closed santiago-flores-kenility closed 2 years ago

santiago-flores-kenility commented 3 years ago

await page.goto(body.url); await page.waitForTimeout(5000);

fails with: { "errorType": "TypeError", "errorMessage": "page.waitForTimeout is not a function", "stack": [ "TypeError: page.waitForTimeout is not a function", " at Runtime.exports.handler (/var/task/src/testing.js:31:14)", " at processTicksAndRejections (internal/process/task_queues.js:97:5)" ] }

How can I set the timeout? Is there any other options?

Thank you

rlecaro2 commented 3 years ago

Be sure to be using the layer that has Puppeteer v.5.3.0 or greater since that version is the one that introduces waitForTimeout.

The deprecated method is using waitFor.

vladholubiev commented 2 years ago

Yeap, and now the version is 14.3.0 🙂