UNPKG

scrapper-tools

Version:

Its in development but I use it in all my web automation project.

12 lines (10 loc) 232 B
import delay from "delay" export default async function waitForFrame(page, frameUrl) { while (true) { let f = page.frames().find((f) => f.url().includes(frameUrl)) if (f) { return f } await delay(100) } }