title: Puppeteer cors mistake
body: <p>hello i have problem in my code using puppeteer, cors error happens randomly but in 80% of my tests. Here is my code thanks for help.Btw the server respond is </p>
  
  <p>Access to fetch at '<a href="https://secure-store.nike.com/eu/services/jcartService/?action=addItem&amp;rt=json&amp;country=GB&amp;region=eu&amp;lang_locale=en_GB&amp;catalogId=1&amp;productId=12238990&amp;qty=1&amp;skuId=21502246" rel="noreferrer">https://secure-store.nike.com/eu/services/jcartService/?action=addItem&amp;rt=json&amp;country=GB&amp;region=eu&amp;lang_locale=en_GB&amp;catalogId=1&amp;productId=12238990&amp;qty=1&amp;skuId=21502246</a>' from origin '<a href="https://www.nike.com" rel="noreferrer">https://www.nike.com</a>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.</p>
  
  <pre><code>const puppeteer = require('puppeteer');
  const jsonfile = require('jsonfile')
  
  function evaluate_click(element,page){
    page.evaluate((el) =&gt; {
       el.click()
    },element);
  }
  
  async function bot(){
  const browser = await puppeteer.launch({headless: false})
  const page = await browser.newPage()
  setTimeout(function(){
      browser.close()
  },120000)
  await page.goto('https://www.nike.com/gb/launch/t/air-max-deluxe-midnight-navy-laser-orange-persian-violet/')
  await page.waitForSelector('button.ncss-btn-accent.ncss-brand.pt3-sm.pb3-sm.pt2-lg.pb2-lg.u-uppercase.ta-sm-c.u-full-width')
  await page.click('button.ncss-btn-accent.ncss-brand.pt3-sm.pb3-sm.pt2-lg.pb2-lg.u-uppercase.ta-sm-c.u-full-width')
  await page.waitFor(1000)
  await page.waitForSelector('button[aria-haspopup="true"]')
  await page.click('button[aria-haspopup="true"]')
  await page.waitForXPath("//ul[contains(@class,'')]//li[11]//button[1]")
  var select_size = await page.$x("//ul[contains(@class,'')]//li[11]//button[1]")
  await evaluate_click(select_size[0],page)
  await page.waitFor(1000)
  await page.waitForSelector('button.ncss-brand.ncss-btn-black.pb3-sm.prl5-sm.pt3-sm.u-uppercase.u-full-width')
  await page.click('button.ncss-brand.ncss-btn-black.pb3-sm.prl5-sm.pt3-sm.u-uppercase.u-full-width')
  await page.waitForSelector('a[data-qa="checkout-link"]')
  await page.click('a[data-qa="checkout-link"]')
  </code></pre>
  
  <p>}</p>
  
  <p>bot()</p>