title: How to tackle Windows authentication in Puppeteer headless testing
body: <p>How to get into the application which use windows authentication, </p>
  
  <p>Hi All am new to puppeteer trying to do some automation and performance testing with puppeteer, so while trying to get into to application and do a sample check am not able to proceed because windows authentication not able to get through please help, i tried below code not working :( </p>
  
  <pre><code>const puppeteer = require('puppeteer');
  
  
  
  async function test() {
  
      const proxyUrl = 'URL';
      const username = 'Uname';
      const password = 'pwd';
  
      const browser = await puppeteer.launch({
          args: [`--proxy-server=${proxyUrl}`],
          headless: false,
      });
  
      // let browser = await puppeteer.launch({ headless: false });
      let page = await browser.newPage();
  
      await page.authenticate({ username, password });
      await page.goto('URL')
  
      const html = await page.$eval('.ds-tile-container', e =&gt; e.innerHTML)
      expect(html).not.toBeNull();
      await page.pdf({ path: 'hn.pdf', format: 'A4' });
  
      browser.close()
  }
  
  test();
  </code></pre>
  
  <p>I tried below code also </p>
  
  <pre><code>const oldProxyUrl = 'https://siteurl:8080';
      const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);
  
      console.log(newProxyUrl);
  
      const args = [
          '--disable-setuid-sandbox',
          '--no-sandbox',
          '--ignore-certificate-errors',
          '--ignore-certificate-errors-spki-list ',
        ];
        const options = {
          args,
          headless: true,
          ignoreHTTPSErrors: true,
        };
  
      const browser = await puppeteer.launch(options);
  </code></pre>
  
  <p>now am getting error like</p>
  
  <blockquote>
    <p>(node:20520) UnhandledPromiseRejectionWarning: Unhandled promise
    rejection (rejection id: 1): Error: Invalid "proxyUrl" option: only
    HTTP proxies are currently supported. (node:20520) [DEP0018]
    DeprecationWarning: Unhandled promise rejections are deprecated. In
    the future, promise rejections that are not handled will terminate the
    Node.js process with a non-zero exit code.</p>
  </blockquote>