【Puppeteer】waitFor is deprecated and will be removed in a future release.

Puppeteer を使っていて
なにかと便利なwaitFor

だけどこんなメッセージが表示されて
いずれ使えなくなるみたいな。。。
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.

そんなときはコレだ!
const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms))

(async() => {
  。。。
await wait(3000);
  。。。

コメント

タイトルとURLをコピーしました