title: Puppeteer - Wait for network requests to complete after page.select()
body: <p>Is there a way to wait for network requests to resolve after performing an action on a page, before performing a new action in Puppeteer?</p>
  
  <p>I need to interact with a select menu on the page using <code>page.select()</code> which causes dynamic images and fonts to load into the page. I need to wait for these requests to complete before executing the next action.</p>
  
  <p>--</p>
  
  <p><strong>Caveats:</strong></p>
  
  <ol>
  <li>I cannot reload the page or go to a new url.</li>
  <li>I do not know what the request types might be, or how many</li>
  </ol>
  
  <p>--</p>
  
  <pre><code>// launch puppeteer
  const browser = await puppeteer.launch({});
  
  // load new page
  const page = await browser.newPage();
  
  // go to URL and wait for initial requests to resolve
  await page.goto(pageUrl, {
    waitUntil: "networkidle0"
  });
  
  // START LOOP
  for (let value of lotsOfValues) {
  
    // interact with select menu
    await page.select('select', value);
  
    // wait for network requests to complete (images, fonts)
    ??
  
    // screenshot page with new content
    await pageElement.screenshot({
      type: "jpeg",
      quality: 100
    });
  
  } // END LOOP
  
  // close
  await browser.close();
  </code></pre>