How To Wait For Event Triggered Page Reloads With Puppeteer?
I'm trying safely handle the behavior of a page which uses an in-browser event on a select element to trigger a page reload (POST). The URL is the same but the page reloads with th
Solution 1:
There may be a race condition between selecting and navigation promises (see examples here or here). Can you try this approach?
awaitPromise.all([
page.select('select[name=sort]', 'size'),
page.waitForNavigation(),
]);
await page.waitForSelector('select[name=sort]');
Post a Comment for "How To Wait For Event Triggered Page Reloads With Puppeteer?"